multiple_random_choice 0.1.3+1 multiple_random_choice: ^0.1.3+1 copied to clipboard
A function library to choose multiple items randomly. This library supports weighted randomly choosing too. Typical examples of usage are lottery and gacha.
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add multiple_random_choice
With Flutter:
$ flutter pub add multiple_random_choice
This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get
):
dependencies:
multiple_random_choice: ^0.1.3+1
Alternatively, your editor might support dart pub get
or flutter pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:multiple_random_choice/multiple_random_choice.dart';