weighted_random 0.2.1 copy "weighted_random: ^0.2.1" to clipboard
weighted_random: ^0.2.1 copied to clipboard

Weighted Random Algorithm for Dart libraries or applications.

example/weighted_random_example.dart

import 'package:weighted_random/weighted_random.dart';

void main() {
  final List<String> stringList = ["a", "b", "c", "d"];
  final Map<String, dynamic> result =
      weightedRandom<String>(stringList, [40, 20, 60, 20]);

  print(result);
}
5
likes
140
pub points
24%
popularity

Publisher

unverified uploader

Weighted Random Algorithm for Dart libraries or applications.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on weighted_random