load method
void
load()
Trigger the loading process. This will attempt a sync warm load, optimizing for the case where the assets we need are already available. This allows widgets using this render object to draw immediately and not draw any empty frames.
Implementation
void load() {
if (!canLoad) {
return;
}
if (_isLoading) {
_reloadQueued = true;
return;
}
_isLoading = true;
_unload();
// Try a sync warm load in case we already have what we need.
if (!warmLoad()) {
coldLoad().then((_) {
_completeLoad();
});
} else {
_completeLoad();
}
}