callLoadResources method
Calls loadResources.
Implementation
FutureOr<bool> callLoadResources(PCanvas pCanvas) {
if (_loadingResources) return false;
_loadingResources = true;
try {
var ret = loadResources(pCanvas);
if (ret is Future<bool>) {
return _loadingFuture = ret.whenComplete(() {
_loadingResources = false;
});
} else {
_loadingResources = false;
_loadingFuture = true;
return ret;
}
} catch (e) {
_loadingResources = false;
_loadingFuture = false;
rethrow;
}
}