Hyphenator class
Wrapper class hyphenating text.
Constructors
- Hyphenator.new(LanguageConfig config, {String symbol = '\u{00AD}', String hyphen = '-', int minWordLength = 5, int minLetterCount = 3})
- Instantiates a Hyphenator with a given language configuration from Dart object.
Properties
-
cachedHyphendWords
→ List<
String> -
Returns cached and hyphenated words.
no setter
-
cachedNonHyphendWords
→ List<
String> -
Returns cached and non-hyphenated words.
no setter
- calc ↔ CalculationHelper
-
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
hyphenateText(
String text, {dynamic hyphenAtBoundaries = false}) → String - Hyphenates a text.
-
hyphenateTextToTokens(
String text) → List< TextPartToken> -
hyphenateWord(
String word) → String - Hyphenates a single word.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
syllablesWord(
String word) → List< String> - Returns syllables of a single word, being candidates for hyphenation.
-
toString(
) → String -
A string representation of this object.
inherited
-
wrap(
Text text, TextStyle style, dynamic maxWidth) → WrapResult -
Wraps the
text
with respect to the givenstyle
andmaxWidth
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
Static Methods
-
getLanguageEnum(
String lang) → Language -
languageAbbr(
) → List< String> - Returns abbreviations of available languages.
-
loadAsync(
Language lang, {String symbol = '\u{00AD}', String hyphen = '-', int minWordLength = 5, int minLetterCount = 3}) → Future< Hyphenator> - Instantiates a Hyphenator with a given language configuration from JSON.
-
loadAsyncByAbbr(
String lang, {String symbol = '\u{00AD}', String hyphen = '-', int minWordLength = 5, int minLetterCount = 3}) → Future< Hyphenator> - Instantiates a Hyphenator with a given language configuration from JSON.
-
wrapNoHyphen(
Text text, TextStyle style, double maxWidth) → WrapResult - Service method to wrap a text and NOT perform hyphenation.