Generate strong passwords for flutter applications using native function without dependencies
iOS >= 13.0
Android >= 26
flutter pub add flutter_password_generator
import 'package:flutter_chacha20_poly1305/flutter_chacha20_poly1305.dart';
final _flutterPasswordGeneratorPlugin = FlutterPasswordGenerator(length: 24);
final pwd = await _flutterPasswordGeneratorPlugin.generatePassword();
print('Generated password: ${pwd}');
// Generated password: {password: 8M:a[1>]8oXFCyPF2xa0BrM], strength: strong}
if no passwordConfig object is passed when init FlutterPasswordGenerator(password_config);, it'll use the default config object:
(
length: 20,
lowercaseIncluded: true,
uppercaseIncluded: true,
numbersIncluded: true,
symbolsIncluded: true
)
Hayr Hotoca | @1limxapp
This package is used in my cross-platform app called 1LimX
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT