load method

  1. @override
void load(
  1. Cache<CacheAsset> cache,
  2. AssetProvider assetProvider
)
override

Implementation

@override
void load(Cache cache, AssetProvider assetProvider) {
  super.load(cache, assetProvider);
  assetProvider.load().then((ByteData data) {
    if (useCompute) {
      compute(FlutterActor.loadFromByteData, data)
          .then((FlutterActor actor) => loadedActor(actor, assetProvider));
    } else {
      FlutterActor.loadFromByteData(data)
          .then((FlutterActor actor) => loadedActor(actor, assetProvider));
    }
  });
}