BoxHeightStyle enum Null safety

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

See BoxWidthStyle for a similar property to control width.

Inheritance

Constructors

BoxHeightStyle()
const

Values

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.

BoxHeightStyle()
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 BoxHeightStyle.includeLineSpacingTop, BoxHeightStyle.includeLineSpacingMiddle, and BoxHeightStyle.includeLineSpacingBottom for styles that will cover the entire line.

BoxHeightStyle()
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.

BoxHeightStyle()
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.

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.

BoxHeightStyle()
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.

BoxHeightStyle()
strut → const BoxHeightStyle

Calculate box heights based on the metrics of this paragraph's StrutStyle.

Boxes based on the strut will have consistent heights throughout the entire paragraph. The top edge of each line will align with the bottom edge of the previous line. It is possible for glyphs to extend outside these boxes.

BoxHeightStyle()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
index int
A numeric identifier for the enumerated value.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

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

Operators

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

Constants

values → const List<BoxHeightStyle>
A constant List of the values in this enum, in order of their declaration.
[tight, max, includeLineSpacingMiddle, includeLineSpacingTop, includeLineSpacingBottom, strut]