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.

The size and alignment properties are required and cannot be null.

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
  • @immutable

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
size Size
Width and height dimensions of the placeholder.
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