load static method
Loads an Svg with the received cache
. When no cache
is provided,
the global Flame.assets
is used.
Implementation
static Future<Svg> load(
String fileName, {
AssetsCache? cache,
double? pixelRatio,
}) async {
cache ??= Flame.assets;
final svgString = await cache.readFile(fileName);
return Svg.loadFromString(svgString, pixelRatio: pixelRatio);
}