A least-recently-used cache of laid out TextPainters, so drawing and measuring the same label every frame does not lay it out again.
Every text measurement and every drawText of the port goes through layout.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
-
clearCache(
) → void - Drops every cached layout.
-
layout(
String text, TextStyle style, {double? maxWidth, int? maxLines}) → TextPainter -
Returns
textinstylelaid out left to right, at mostmaxWidthwide (unbounded when null) and with at mostmaxLineslines (unlimited when null).
Constants
- maxEntries → const int
- The maximum number of laid out texts that are kept.