WordPair class Null safety

Representation of a combination of 2 words, first and second.

This is can be also described as a two-part compound (in the linguistic sense of the word). https://en.wikipedia.org/wiki/Compound_(linguistics)

For example, 'Skyrim' is a word pair, where 'sky' is the first part and 'rim' is the second.

Constructors

WordPair(String first, String second)
Create a WordPair from the strings first and second.
WordPair.random({int maxSyllables = maxSyllablesDefault, int top = topDefault, bool safeOnly = safeOnlyDefault, Random? random})
Creates a single WordPair randomly. Takes the same parameters as generateWordPairs.
factory

Properties

asCamelCase String
Returns the word pair as a simple string, with second word capitalized, like "keyFrame" or "franceLand". This is informally called "camel case".
latefinal
asLowerCase String
Returns the word pair as a simple string, in lower case, like "keyframe" or "franceland".
latefinal
asPascalCase String
Returns the word pair as a simple string, with each word capitalized, like "KeyFrame" or "BigUsa". This is informally called "pascal case".
latefinal
asSnakeCase String
Returns the word pair as a simple string, separated by an underscore, like "key_frame" or "big_usa". This is informally called "snake case".
latefinal
asString String
Returns the word pair as a simple string, like "keyframe" or "bigFrance".
latefinal
asUpperCase String
Returns the word pair as a simple string, in upper case, like "KEYFRAME" or "FRANCELAND".
latefinal
first String
The first part of the pair.
final
hashCode int
The hash code for this object.
read-onlyoverride
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
second String
The second part of the pair.
final

Methods

join([String separator = '']) String
Returns a string representation of the WordPair where the two parts are joined by separator.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toLowerCase() WordPair
Creates a new WordPair with both parts in lower case.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override