A dart based util package for generating random nouns
, verbs
, names
, strong password
and validate the given password
is strong or not. This package helps you to generate random words and passwords for your project without any hassle.
- randomNouns
- randomNoun
- randomSentence
- randomVerbs
- randomVerb
- randomNames
- nandomName
- countSyllables
- generatePassword
- validatePassword
Generate a random 8 digit password. If no length is provided then default length is taken as 8.
import 'package:word_generator/word_generator.dart';
main() {
final passwordGenerator = PasswordGenerator();
String password = passwordGenerator.generatePassword();
print(password)
}
Check the given string is strong password or not.
import 'package:word_generator/word_generator.dart';
main() {
final passwordGenerator = PasswordGenerator();
bool password = passwordGenerator.validatePassword('abcABC123!@#');
print(password)
}
Print 3 random nouns. Parameter is optional, if no param is provided then 2 noun will be generated.
import 'package:word_generator/word_generator.dart';
main() {
final wordGenerator = WordGenerator();
List<String> nouns = wordGenerator.randomNouns(3);
print(nouns);
}
Print single random noun.
import 'package:word_generator/word_generator.dart';
main() {
final wordGenerator = WordGenerator();
String noun = wordGenerator.randomNoun();
print(noun);
}
Print sentence with the random nouns. Parameter is optional, if no param is provided then 2 noun will be generated.
import 'package:word_generator/word_generator.dart';
main() {
final wordGenerator = WordGenerator();
List<String> noun = wordGenerator.randomSentence(3);
print(noun);
}
Print count of the syllables in the word
import 'package:word_generator/word_generator.dart';
main() {
final wordGenerator = WordGenerator();
int count = wordGenerator.countSyllables('dart');
print(count);
}
Print 3 random verbs. Parameter is optional, if no param is provided then 2 noun will be generated.
import 'package:word_generator/word_generator.dart';
main() {
final wordGenerator = WordGenerator();
List<String> verbs = wordGenerator.randomVerbs(3);
print(verbs);
}
Print single random verb.
import 'package:word_generator/word_generator.dart';
main() {
final wordGenerator = WordGenerator();
String verb = wordGenerator.randomVerb();
print(verb);
}
Print 3 random names. Parameter is optional, if no param is provided then 2 noun will be generated.
import 'package:word_generator/word_generator.dart';
main() {
final wordGenerator = WordGenerator();
List<String> names = wordGenerator.randomNames(3);
print(names);
}
Print single random name.
import 'package:word_generator/word_generator.dart';
main() {
final wordGenerator = WordGenerator();
String name = wordGenerator.randomName();
print(name);
}
If you face any issues, please raise an issue.