How do I generate random numbers using Dart?
An alternative solution could be using the following code DRandom. This class should be used with a seed. It provides a familiar interface to what you would expect in .NET, it was ported from mono's Random.cs. This code may not be cryptography safe and has not been statistically tested.
its worked for me new Random().nextInt(100); // MAX = number
it will give 0 to 99 random number
Eample::
import 'dart:math';
int MAX = 100;
print(new Random().nextInt(MAX));`