RandomText class

Random generator for various text values like names, addresses or phone numbers.

Example

var value1 = RandomText.name();     // Possible result: "Segio"
var value2 = RandomText.verb();      // Possible result: "Run"
var value3 = RandomText.Text(50);    // Possible result: "Run jorge. Red high scream?"

Constructors

RandomText()

Properties

hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited

Static Methods

adjective() → String
Generates a random adjective. The result value is capitalized. [...]
color() → String
Generates a random color name. The result value is capitalized. [...]
email() → String
Generates a random email address. [...]
fullName() → String
Generates a random person's name which has the following structure [...]
noun() → String
Generates a random noun. The result value is capitalized. [...]
phone() → String
Generates a random phone number. The phone number has the format: (XXX) XXX-YYYY [...]
phrase(int minLength, [ int maxLength = null ]) → String
Generates a random phrase which consists of few words separated by spaces. The first word is capitalized, others are not. [...]
text(int minLength, [ int maxLength = null ]) → String
Generates a random text, consisting of first names, last names, colors, stuffs, adjectives, verbs, and punctuation marks. [...]
verb() → String
Generates a random verb. The result value is capitalized. [...]
word() → String
Generates a random word from available first names, last names, colors, stuffs, adjectives, or verbs. [...]
words(int min, [ int max = null ]) → String
Generates a random text that consists of random number of random words separated by spaces. [...]