dart_collection_sampler

Creator: coderz1093

Last updated:

0 purchases

dart_collection_sampler Image
dart_collection_sampler Images

Languages

Categories

Add to Cart

Description:

dart collection sampler

dart_collection_sampler #




a small library implementing methods to sample items from collections
Usage #
A simple usage example:

void deal(int n, List<String> items, {required bool unique}) {
stdout.writeln("Picking $n from $items (unique: $unique)\n");

if (n == 1) {
stdout.writeln("Selected item: ${CollectionSampler().pick(items)}");
} else {
stdout.writeln(
"Selected items: ${CollectionSampler().pickN(items, n, unique: unique)}",
);
}
}
copied to clipboard
Features and bugs #
Please file feature requests and bugs at the issue tracker.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.