How to generate random numbers in Dart?

Posted by Andre Scott | Updated on | Dart

Want to generate random numbers in Dart? Use Random class from dart:math:

This code was tested with the Dart VM and dart2js, as of the time of this writing.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers