loadBytes method

  1. @override
Future<ByteData> loadBytes()

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() {
  return svg.cache.putIfAbsent(cacheKey(), () => _load());
}