Loading SVG via network not possible
Opened this issue · 2 comments
ravindranathakila commented
At the moment, the library allows loading assets via assets;
We would love to be able to load SVG via web. At the moment; as a workaround we do the following:
Modify drawing_animation.dart
:
Add the line
export 'src/parser.dart';
Load the file via network, and parse the content as:
SvgParser example(filePath) {
SvgParser parser = SvgParser();
parser.loadFromString(File(filePath).readAsStringSync());
return parser;
}
Then use it as:
AnimatedDrawing.paths(svgParser.getPaths())
While loading file via network might not be a priority, we would like parser.dart
to be available to use meanwhile.
erik-seifert commented
Would be a great feature.
atn832 commented
Have you considered alternatives like https://pub.dev/packages/svg_drawing_animation? I made svg_drawing_animation because I needed a few extra features, and loading from network was among them.