Fix null UUIDs
This commit is contained in:
parent
1024c4dbd7
commit
960cf0d789
3 changed files with 9 additions and 2 deletions
|
@ -89,7 +89,7 @@ class UUID {
|
||||||
factory UUID.generate(int version, {List<Object>? parameters}) {
|
factory UUID.generate(int version, {List<Object>? parameters}) {
|
||||||
List<Object> params = [];
|
List<Object> params = [];
|
||||||
if (parameters == null) {
|
if (parameters == null) {
|
||||||
if (version != 4) {
|
if (version != 4 && version != 0) {
|
||||||
return UUID.generate(4);
|
return UUID.generate(4);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: libac_flutter
|
name: libac_flutter
|
||||||
description: "Aria's Creations code library"
|
description: "Aria's Creations code library"
|
||||||
version: 1.0.4
|
version: 1.0.5
|
||||||
homepage: "https://zontreck.com"
|
homepage: "https://zontreck.com"
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
|
|
@ -75,4 +75,11 @@ void main() {
|
||||||
|
|
||||||
expect(ID3.toString(), asString);
|
expect(ID3.toString(), asString);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("Null UUID", () {
|
||||||
|
var expected = "00000000-0000-0000-0000-000000000000";
|
||||||
|
var actual = UUID.ZERO.toString();
|
||||||
|
|
||||||
|
expect(actual, expected);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue