DTD is local host or over SSH due to the unecrypted websocket.
Browsers block unsecure WS over HTTPS. The key generated is for tagging multiple instances per IDE not security.
Random is instant and is used for runtime collision prevention and performance especially UI, not uniqueness, PRNG is not truly random anyways.
Random.secure has a large overhead accessing OS entropy and isn't always supported. [1]
Go 'math/rand', python 'Random', C# 'Random' to name a few are also not unique or safe for crypto.
Their secure equivalents: Go 'crypto/rand', Python 'SystemRandom', C# 'RNGCryptoServiceProvider'.
This isn't a Dart or Flutter issue [0]:
"A generator of random bool, int, or double values.
The default implementation supplies a stream of pseudo-random bits that are not suitable for cryptographic purposes.
Use the Random.secure constructor for cryptographic purposes."
[0] https://api.dart.dev/dart-math/Random-class.html [1] https://api.dart.dev/dart-math/Random/Random.secure.html