TextWrapper class Null safety

Constructors

TextWrapper({int width = 70, String initialIndent = '', String subsequentIndent = '', bool expandTabs = true, bool replaceWhitespace = true, bool fixSentenceEndings = false, bool breakLongWords = true, bool dropWhitespace = true, bool breakOnHyphens = true, int tabSize = 8, int maxLines = -1, String placeholder = ' ...'})

Properties

breakLongWords bool
final
breakOnHyphens bool
final
dropWhitespace bool
final
expandTabs bool
final
fixSentenceEndings bool
final
hashCode int
The hash code for this object.
read-onlyinherited
initialIndent String
final
maxLines int
final
placeholder String
final
replaceWhitespace bool
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
sentenceEndRe RegExp
final
subsequentIndent String
final
tabSize int
final
width int
final
wordSeparatorRe RegExp
final
wordSeparatorSimpleRe RegExp
final

Methods

fill(String text) String
Reformat the single paragraph in 'text' to fit in lines of no more than 'self.width' columns, and return a new string containing the entire wrapped paragraph.
fixEndings(List<String> chunks) → void
handleLongWord(List<String> reversedChunks, List<String> currentLine, int currentLength, int width) → void
mungeWhitespace(String text) String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
split(String text) List<String>
splitChunks(String text) List<String>
toString() String
A string representation of this object.
inherited
wrap(String text) List<String>
Reformat the single paragraph in 'text' so it fits in lines of no more than 'self.width' columns, and return a list of wrapped lines.
wrapChunks(List<String> chunks) List<String>

Operators

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