How do I generate random numbers using Dart?
For me the easiest way is to do:
import 'dart:math'; Random rnd = new Random(); r = min + rnd.nextInt(max - min); //where min and max should be specified.
Thanks to @adam-singer explanation in here.