BackgroundCache class final
Small LRU of gradient shaders and pattern pictures.
Constructors
- BackgroundCache({int capacity = 8})
Properties
Methods
-
clear(
) → void - Drops (and disposes) everything.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
picture(
BackgroundSpec spec, Size size, Picture build()) → Picture -
The cached picture for
specatsize, built bybuildon a miss. -
scenePicture(
Object key, Picture build()) → Picture -
A family scene's cached picture for
key(value equality: e.g. a record of the spec, the size and the text-safe area), built bybuildon a miss; evicted pictures are disposed. -
shader(
BackgroundSpec spec, Size size, Shader build()) → Shader -
The cached shader for
specatsize, built bybuildon a miss. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → BackgroundCache
-
The app-wide cache.
final