cacheKey method

  1. @override
SvgCacheKey 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
SvgCacheKey cacheKey(BuildContext? context) {
  final SvgTheme theme = getTheme(context);
  return SvgCacheKey(keyData: this, theme: theme, colorMapper: colorMapper);
}