chance 2.1.0 copy "chance: ^2.1.0" to clipboard
chance: ^2.1.0 copied to clipboard

A minimalist generator of random numbers - inspired by chance.js

example/main.dart

import 'package:chance/chance.dart';

void main() {
  int randomInteger = Chance.integer(min: 3, max: 12);

  double randomDouble = Chance.floating(min: 3, max: 12);

  bool randomBool = Chance.boolean(likelihood: 30);

  print('Random integer: $randomInteger\n'
      'Random double: $randomDouble\n'
      'Random boolean: $randomBool');
}
10
likes
160
points
73
downloads

Publisher

verified publishervimuser.com

Weekly Downloads

A minimalist generator of random numbers - inspired by chance.js

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

More

Packages that depend on chance