precacheSvgFile function

Future<void> precacheSvgFile(
  1. String imageUri
)

precache svg data

Implementation

Future<void> precacheSvgFile(String imageUri) async {
  final loader = SvgAssetLoader(imageUri);
  await svg.cache
      .putIfAbsent(loader.cacheKey(null), () => loader.loadBytes(null));
}