ThemeCache class final

A small LRU of resolved specs, so prefetched themes are ready when the user swipes (generation is < 2 ms, but a commit frame should not pay it).

Constructors

ThemeCache({int capacity = 16, ThemeGenerator generator = const ThemeGenerator()})

Properties

capacity → int
final
generator → ThemeGenerator
final
hashCode → int
The hash code for this object.
no setterinherited
length → int
Number of cached specs.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
contains(FeedEntry entry, {bool accessible = false}) → bool
Whether entry is cached.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prefetch(Iterable<FeedEntry> entries, {bool accessible = false}) → void
Resolves every entry (e.g. from ThemeFeed.onPrefetch).
specFor(FeedEntry entry, {bool accessible = false}) → ThemeSpec
The spec for entry (generated on a miss).
toString() → String
A string representation of this object.
inherited

Operators

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