prefer-random-secure
Warns when Random is used in a security-sensitive context.
The output of Random is predictable and must not be used in security-sensitive contexts.
Example
❌ Bad:
void fn() {
// LINT: The output of Random is predictable and must not be used in security-sensitive contexts.
// Try using 'Random.secure()' instead.
final random = Random();
}
✅ Good:
void fn() {
final random = Random.secure();
}