PlaceholderAlignment enum Null safety

Where to vertically align the placeholder relative to the surrounding text.

Used by ParagraphBuilder.addPlaceholder.

Inheritance

Constructors

PlaceholderAlignment()
const

Values

baseline → const PlaceholderAlignment

Match the baseline of the placeholder with the baseline.

The TextBaseline to use must be specified and non-null when using this alignment mode.

const PlaceholderAlignment(0)
aboveBaseline → const PlaceholderAlignment

Align the bottom edge of the placeholder with the baseline such that the placeholder sits on top of the baseline.

The TextBaseline to use must be specified and non-null when using this alignment mode.

const PlaceholderAlignment(1)
belowBaseline → const PlaceholderAlignment

Align the top edge of the placeholder with the baseline specified such that the placeholder hangs below the baseline.

The TextBaseline to use must be specified and non-null when using this alignment mode.

const PlaceholderAlignment(2)
top → const PlaceholderAlignment

Align the top edge of the placeholder with the top edge of the text.

When the placeholder is very tall, the extra space will hang from the top and extend through the bottom of the line.

const PlaceholderAlignment(3)
bottom → const PlaceholderAlignment

Align the bottom edge of the placeholder with the bottom edge of the text.

When the placeholder is very tall, the extra space will rise from the bottom and extend through the top of the line.

const PlaceholderAlignment(4)
middle → const PlaceholderAlignment

Align the middle of the placeholder with the middle of the text.

When the placeholder is very tall, the extra space will grow equally from the top and bottom of the line.

const PlaceholderAlignment(5)

Properties

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

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<PlaceholderAlignment>
A constant List of the values in this enum, in order of their declaration.
[baseline, aboveBaseline, belowBaseline, top, bottom, middle]