TextPainterCache class

Caches TextPainter layout results with bounded LRU eviction.

v2 change: uses LinkedHashMap with access-order tracking for true LRU eviction instead of clearing the entire cache when the size limit is hit.

Constructors

TextPainterCache()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
no setter
stats ChartObjectCacheStats
no setter

Methods

clear({bool resetMetrics = true}) → void
get(String text, TextStyle style, {double maxWidth = double.infinity, TextAlign align = TextAlign.left}) TextPainter
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resetStats() → void
toString() String
A string representation of this object.
inherited

Operators

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