PlaceholderDimensions class
Holds the Size and baseline required to represent the dimensions of a placeholder in text.
Placeholders specify an empty space in the text layout, which is used to later render arbitrary inline widgets into defined by a WidgetSpan.
See also:
- WidgetSpan, a subclass of InlineSpan and PlaceholderSpan that represents an inline widget embedded within text. The space this widget takes is indicated by a placeholder.
- RichText, a text widget that supports text inline widgets.
- Annotations
Constructors
- PlaceholderDimensions({required Size size, required PlaceholderAlignment alignment, TextBaseline? baseline, double? baselineOffset})
-
Constructs a PlaceholderDimensions with the specified parameters.
const
Properties
- alignment → PlaceholderAlignment
-
How to align the placeholder with the text.
final
- baseline → TextBaseline?
-
The TextBaseline to align to. Used with:
final
- baselineOffset → double?
-
Distance of the baseline from the upper edge of the placeholder.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → Size
-
Width and height dimensions of the placeholder.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Constants
- empty → const PlaceholderDimensions
- A constant representing an empty placeholder.