Last active
January 3, 2024 23:59
-
-
Save OwlCodR/b2b7839096e2c859feacdceb1cf0728c to your computer and use it in GitHub Desktop.
Simple way to generate uuid v4 with seed in Flutter via Dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:uuid/uuid.dart'; | |
import 'package:uuid/uuid_util.dart'; | |
String getUuid(int seed) { | |
return Uuid().v4( | |
options: { | |
'rng': UuidUtil.mathRNG, | |
'namedArgs': { | |
#seed: seed, | |
}, | |
}, | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment