uuid function
Generates a UUID (v4).
If secure
is true
, uses a crypto-secure RNG at the cost of worse
performance (5-100x, depending on the platform).
Implementation
String uuid({bool secure = false}) => const Uuid().v4(
// ignore: deprecated_member_use
options: !secure
? null
: const <String, Object>{
'rng': _cryptoRNG,
'positionalArgs': [],
'namedArgs': <Symbol, dynamic>{},
},
);