Random.secure()

Creates a cryptographically secure random number generator.

If the program cannot provide a cryptographically secure source of random numbers, it throws an UnsupportedError.

Source

external factory Random.secure();