Last active
July 28, 2020 14:43
-
-
Save kumar-aakash86/4e9ebbb61cafa08ef374d0e7db18284b to your computer and use it in GitHub Desktop.
Dart Generate Function - Random Numbers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2015 the Dart project authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license | |
// that can be found in the LICENSE file. | |
import 'dart:math'; | |
void main() { | |
var random = Random(); | |
List<int> numberList = List<int>.generate(10, (i) => random.nextInt(100)); | |
numberList.forEach(print); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment