SkinPrefetcher class
Downloads one self-contained skin file into SkinFileCache. Called when a
gamification campaign arrives or a grant is answered; the SDK never builds
a skin URL itself, it only prefetches the bundleUrl from the payload.
One download at a time (single queue); a failed download is dropped and retried at the next trigger. Already-complete skins are skipped.
Constructors
- SkinPrefetcher(SkinFileCache _cache, SkinBundleFetcher _fetch)
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
-
awaitIdle(
{int timeoutMs = 10000}) → Future< bool> -
Waits until every queued prefetch has finished; for tests. Returns false
when
timeoutMspasses first. -
cancelPending(
) → void - Drops queued prefetches and discards in-flight downloads instead of caching them. Called on user change and reset so the next user never inherits the previous user's skins. Port of iOS cancelling prefetch tasks on SDK reset. Never throws.
-
downloadNow(
String bundleUrl) → Future< bool> -
Downloads
bundleUrlfor a show-time cache miss without waiting behind queued prefetches of other skins. Returns whether the skin is servable. Never throws. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prefetch(
String bundleUrl) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited