文件名称:dart_random_choice:Dart的随机选择生成器
文件大小:6KB
文件格式:ZIP
更新时间:2024-03-07 23:03:28
dart random flutter dartlang flutter-package
dart_random_choice 一个从迭代器生成随机选择的库。 例子 import 'dart:math' show Point; import 'package:dart_random_choice/dart_random_choice.dart' ; void main () { const List < String> foodOptions = [ 'burger' , 'pizza' , 'salad' ]; const List < double> weights = [ 10 , 20 , 0.4 ]; String whatToEat = randomChoice < String> (foodOptions, weights); // I probably won't be eating a salad... Set < Point>
【文件预览】:
dart_random_choice-master
----example()
--------main.dart(824B)
----test()
--------dart_random_choice_test.dart(2KB)
----LICENSE(1KB)
----pubspec.lock(7KB)
----.gitignore(47B)
----pubspec.yaml(443B)
----CHANGELOG.md(152B)
----lib()
--------dart_random_choice.dart(2KB)
----README.md(816B)