Skip to content

Commit

Permalink
Made fromByteList and fromList match
Browse files Browse the repository at this point in the history
  • Loading branch information
Erhannis authored and daegalus committed Aug 30, 2023
1 parent 14cb91c commit c2dd584
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/uuid_value.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ class UuidValue {
final String uuid;

/// fromByteList() creates a UuidValue from a [Uint8List] of bytes.
factory UuidValue.fromByteList(Uint8List byteList, {int? offset}) {
return UuidValue(UuidParsing.unparse(byteList, offset: offset ?? 0));
factory UuidValue.fromByteList(Uint8List byteList, {int? offset, bool validate = true, ValidationMode validationMode = ValidationMode.strictRFC4122}) {
return UuidValue(UuidParsing.unparse(byteList, offset: offset ?? 0), validate, validationMode);
}

/// fromList() creates a UuidValue from a [List<int>] of bytes.
factory UuidValue.fromList(List<int> byteList, {int? offset}) {
return UuidValue(UuidParsing.unparse(byteList, offset: offset ?? 0));
factory UuidValue.fromList(List<int> byteList, {int? offset, bool validate = true, ValidationMode validationMode = ValidationMode.strictRFC4122}) {
return UuidValue(UuidParsing.unparse(byteList, offset: offset ?? 0), validate, validationMode);
}

/// withValidation() creates a UuidValue from a [uuid] string.
/// Optionally, you can provide a [validationMode] to use when validating
/// the uuid string.
Expand Down

0 comments on commit c2dd584

Please sign in to comment.