RoPasswordGenerator
A flutter package that randomly generates password with digits, lowcase characters, upcase characters and special characters.
Usage
// Generate a password with length 12, include digits, lowcase characters, upcase characters and allow similiar characters
final password = RoPasswordGenerator.generate(length: 12, includeUpcaseChars: true, excludeSimiliarChars: false);
Installation
- Add the latest version of package to your pubspec.yaml (and run
dart pub get):
dependencies:
ro_password_generator: ^0.0.1
- Import the package and use it in your Flutter App.
import 'package:ro_password_generator/ro_password_generator.dart';
API Reference
PasswordGenerator.generate
static String generate({
int length = 8,
bool includeDigits = true,
bool includeLowcaseChars = true,
bool includeUpcaseChars = false,
bool includeSpecialChars = false,
bool excludeSimiliarChars = true,
})
length: The length of the password (default:8)includeDigits: include digits in the password (default:true)includeLowcaseChars: include lowcase characters in the password (default:true)includeUpcaseChars: include upcase characters in the password (default:false)includeSpecialChars: include special characters in the password (default:false)excludeSimiliarChars: exclude similar characters (default:false)- Returns: A randomly generated password