A paragraph of text.
A paragraph retains the size and position of each glyph in the text and can be efficiently resized and painted.
To create a Paragraph object, use a ParagraphBuilder.
Paragraph objects can be displayed on a Canvas using the Canvas.drawParagraph method.
Constructors
- Paragraph()
-
Creates an uninitialized Paragraph object.
Properties
- alphabeticBaseline → double
-
The distance from the top of the paragraph to the alphabetic baseline of the first line, in logical pixels.
read-only - height → double
-
The amount of vertical space this paragraph occupies.
read-only - ideographicBaseline → double
-
The distance from the top of the paragraph to the ideographic baseline of the first line, in logical pixels.
read-only - maxIntrinsicWidth → double
-
Returns the smallest width beyond which increasing the width never decreases the height.
read-only - minIntrinsicWidth → double
-
The minimum width that this paragraph could be without failing to paint its contents within itself.
read-only - width → double
-
The amount of horizontal space this paragraph occupies.
read-only - hashCode → int
-
Get a hash code for this object.
read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
getBoxesForRange(
int start, int end) → List<TextBox> -
Returns a list of text boxes that enclose the given text range.
-
getPositionForOffset(
Offset offset) → TextPosition -
Returns the text position closest to the given offset.
-
getWordBoundary(
int offset) → List<int> -
Returns the
start, end
of the word at the given offset. Characters not part of a word, such as spaces, symbols, and punctuation, have word breaks on both sides. In such cases, this method will returnoffset, offset+1
. Word boundaries are defined more precisely in Unicode Standard Annex #29 http://www.unicode.org/reports/tr29/#Word_Boundaries -
layout(
ParagraphConstraints constraints) → void -
Computes the size and position of each glyph in the paragraph.
-
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