TextPaint class

TextPaint applies a Flutter TextStyle to a string of text, creating a TextPainterTextElement.

Inheritance

Constructors

TextPaint({TextStyle? style, TextDirection textDirection = TextDirection.ltr})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style TextStyle
final
textDirection TextDirection
final

Methods

asInlineTextStyle() InlineTextStyle
copyWith(TextStyle transform(TextStyle), {TextDirection? textDirection}) TextPaint
format(String text) TextPainterTextElement
override
getLineMetrics(String text) LineMetrics
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(Canvas canvas, String text, Vector2 position, {Anchor anchor = Anchor.topLeft}) → void
inherited
toString() String
A string representation of this object.
inherited
toTextPainter(String text) TextPainter
Returns a TextPainter that allows for text rendering and size measuring.

Operators

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

Constants

defaultTextStyle → const TextStyle