BoxHeightStyle enum

Defines various ways to vertically bound the boxes returned by Paragraph.getBoxesForRange.

Constants

includeLineSpacingBottom → const BoxHeightStyle

Extends the bottom edge of the bounds to fully cover any line spacing.

The line spacing will be added to the bottom of the box.

The top edge of each line should be the same as the bottom edge of the line above. There should be no gaps in vertical coverage given any amount of line spacing. Line spacing is not included above the first line and below the last line due to no additional space present there.

const BoxHeightStyle(4)
includeLineSpacingMiddle → const BoxHeightStyle

Extends the top and bottom edge of the bounds to fully cover any line spacing.

The top and bottom of each box will cover half of the space above and half of the space below the line.

The top edge of each line should be the same as the bottom edge of the line above. There should be no gaps in vertical coverage given any amount of line spacing. Line spacing is not included above the first line and below the last line due to no additional space present there.

const BoxHeightStyle(2)
includeLineSpacingTop → const BoxHeightStyle

Extends the top edge of the bounds to fully cover any line spacing.

The line spacing will be added to the top of the box.

null

const BoxHeightStyle(3)
max → const BoxHeightStyle

The height of the boxes will be the maximum height of all runs in the line. All boxes in the same line will be the same height. This does not guarantee that the boxes will cover the entire vertical height of the line when there is additional line spacing.

See RectHeightStyle.includeLineSpacingTop, RectHeightStyle.includeLineSpacingMiddle, and RectHeightStyle.includeLineSpacingBottom for styles that will cover the entire line.

const BoxHeightStyle(1)
tight → const BoxHeightStyle

Provide tight bounding boxes that fit heights per run. This style may result in uneven bounding boxes that do not nicely connect with adjacent boxes.

const BoxHeightStyle(0)
values → const List<BoxHeightStyle>

A constant List of the values in this enum, in order of their declaration.

const List<BoxHeightStyle>

Properties

index int

The integer index of this enum.

final
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

toString() String
Returns a string representation of this object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited