Skip to content

Instantly share code, notes, and snippets.

View th4deu's full-sized avatar

Thadeu Augusto th4deu

View GitHub Profile
@th4deu
th4deu / numero-aleatorio.dart
Last active June 7, 2019 12:40
Gerador de numero aleatorio em dart
/*
generate a random number in DART also giving the option to get a name from an array.
try it in https://dartpad.dartlang.org/. :)
*/
import 'dart:math';
void main() {
Random _random = Random();
int randomNumber(int min, int max) => min + _random.nextInt(max - min);
int qty, from, to;