cacheKey method

  1. @override
Object cacheKey(
  1. BuildContext? context
)
override

Create an object that can be used to uniquely identify this asset and loader combination.

For most BytesLoader subclasses, this can safely return the same instance. If the loader looks up additional dependencies using the context argument of loadBytes, then those objects should be incorporated into a new cache key.

Implementation

@override
Object cacheKey(BuildContext? context) {
  return _AssetByteLoaderCacheKey(
    assetName,
    packageName,
    _resolveBundle(context),
  );
}