FLUTTER ECOSYSTEM

rnd

Extension methods & helpers for Random, and a globally accessible instance. Ex. rnd(10), rnd.getItem(list), rnd.getBit(0.8).

Latest version
0.2.0
30-day downloads
1.2K
Likes
33
Pub points
160

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Overview

The rnd package enhances Dart's Random class with extension methods and utility functions, providing a globally accessible random instance for concise, readable code. It enables simple operations like generating random numbers (rnd(10)), selecting random items from lists (rnd.getItem(list)), and generating biased bits (rnd.getBit(0.8)). Designed for ease of use in games, simulations, and data shuffling, it streamlines common randomization tasks without boilerplate. The package is lightweight and compatible across all major platforms.

Use cases
  • Game development
  • Random item selection
  • Simulations
  • Data shuffling
  • Procedural content generation
Key features
  • Global random instance
  • Extension methods on Random
  • Simple syntax like rnd(10)
  • Support for weighted choices
  • Cross-platform compatibility
Suitable for
  • Developers seeking quick random utilities
  • Game and app creators
  • Prototyping and testing
Considerations
  • Not suitable for cryptographic randomness
  • Limited to non-security-critical use cases
  • Requires understanding of basic randomization concepts
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add rnd

Categories

Source repository

Related projects