Skip to content

Instantly share code, notes, and snippets.

@OwlCodR
Last active January 3, 2024 23:59
Show Gist options
  • Save OwlCodR/b2b7839096e2c859feacdceb1cf0728c to your computer and use it in GitHub Desktop.
Save OwlCodR/b2b7839096e2c859feacdceb1cf0728c to your computer and use it in GitHub Desktop.
Simple way to generate uuid v4 with seed in Flutter via Dart
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