DrawableText class

A Drawable for text objects.

Implemented types

Constructors

DrawableText(String? id, Paragraph? fill, Paragraph? stroke, Offset offset, DrawableTextAnchorPosition anchor, {Float64List? transform})
Creates a new DrawableText object.

Properties

anchor DrawableTextAnchorPosition
The anchor for the offset, i.e. whether it is the start, middle, or end of the text.
final
fill Paragraph?
If specified, how to draw the interior portion of the text.
final
hasDrawableContent bool
Whether this Drawable would be visible if drawn.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
id String?
A string that should uniquely identify this Drawable within its DrawableRoot.
final
offset Offset
The offset for positioning the text. The anchor property controls how this offset is interpreted.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stroke Paragraph?
If specified, how to draw the outline of the text.
final
transform Float64List?
A transform to apply when drawing the text.
final

Methods

draw(Canvas canvas, Rect bounds) → void
Draws the contents or children of this Drawable to the canvas, using the parentPaint to optionally override the child's paint.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

resolveOffset(Paragraph paragraph, DrawableTextAnchorPosition anchor, Offset offset) Offset
Determines the correct location for an Offset given laid-out paragraph and a DrawableTextPosition.