loadBytes method

  1. @override
Future<ByteData> loadBytes(
  1. BuildContext? context
)
override

This method intentionally avoids using await to avoid unnecessary event loop turns. This is meant to to help tests in particular.

Implementation

@override
Future<ByteData> loadBytes(BuildContext? context) {
  return svg.cache.putIfAbsent(cacheKey(context), () => _load(context));
}