import 'dart:math';
void main() {
print(generatePassword(10));
print(generatePassword(20));
print(generatePassword(30));
}
String generatePassword(int passLength) {
String upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
String lower = 'abcdefghijklmnopqrstuvwxyz';
String numbers = '1234567890';
String symbols = '!@#\$%^&*()<>,./';
String seed = upper + lower + numbers + symbols;
String password = '';
List list = seed.split('').toList();
Random rand = Random();
for (int i = 0; i < passLength; i++) {
int index = rand.nextInt(list.length);
password += list[index];
}
return password;
}
0A9B55(gxR
A4!!hgp8V%T.i*e9Jvgv
l$4HN)nxw53tgbKC9thiXYAG#WJ>/*