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. Returns a random adjective.
color() → String
Generates a random color name. The result value is capitalized. Returns a random color name.
email() → String
Generates a random email address. Returns a random email address.
fullName() → String
Generates a random person's name which has the following structure Returns a random name.
noun() → String
Generates a random noun. The result value is capitalized. Returns a random noun.
phone() → String
Generates a random phone number. The phone number has the format: (XXX) XXX-YYYY Returns a random phone number.
phrase(int minLength, [ int maxLength ]) → 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 ]) → 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. Returns a random verb.
word() → String
Generates a random word from available first names, last names, colors, stuffs, adjectives, or verbs. Returns a random word.
words(int min, [ int max ]) → String
Generates a random text that consists of random number of random words separated by spaces. [...]