rand 3.0.1
rand: ^3.0.1 copied to clipboard
Powerful random data generator for Dart. Generate numbers, text, names, passwords, colors, dates, and more. Perfect for testing, mocking, and games.
Changelog #
3.0.1 #
Breaking Changes #
-
integer()andfloat()now use named parameters (min:,max:) -
sample()replacesweightedRandomizedArray():// Before Rand.weightedRandomizedArray(weights: [...], pool: items, size: 5); // After Rand.sample(from: items, count: 5); // equal probability Rand.sample(from: items, count: 5, weights: [...]); // weighted -
charCode()andsafeCharCode()replacechar()andcharSecure() -
Removed
dateTimeYear()— usedateTime(DateTime(year1), DateTime(year2)) -
Collection params renamed to
from -
Password params simplified:
lowercase,uppercase,digits,symbols
New #
color(),colorDark(),colorLight()for CSS colorsCSSColorsenum with 148 named colors
Improved #
- Proper
ArgumentErrorexceptions instead of assertions - 40+ tests with
checkspackage
2.0.3 #
- Updated dependencies
2.0.2 #
- Fixed
boolean()regression - Fixed max int for web
2.0.1 #
- Fixed
nullable()default value
2.0.0 #
- Removed
documentId,uid— useid() - Renamed
mayBeNull→nullable - Added
alias,firstName,lastName,city,latitude,longitude
1.0.0 #
- Initial release