ParagraphCacheMgr class
A singleton manager for caching ui.Paragraph objects.
This class improves text rendering performance by caching laid-out paragraphs.
It uses an LRU (Least Recently Used) strategy to manage the cache size and
ensures that Paragraph objects are properly disposed when evicted.
Constructors
- ParagraphCacheMgr()
-
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
Methods
-
dispose(
) → void - Clears the cache and disposes all cached paragraphs.
-
getEntry(
String text, UiTextPaint textPaint, UiPaint paint, double maxTextWidth) → ParagraphEntry - Retrieves or creates a cached ParagraphEntry for the given text and style.
-
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