Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading SVG via network not possible #15

Open
ravindranathakila opened this issue Feb 27, 2021 · 2 comments
Open

Loading SVG via network not possible #15

ravindranathakila opened this issue Feb 27, 2021 · 2 comments

Comments

@ravindranathakila
Copy link

ravindranathakila commented Feb 27, 2021

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
Copy link

Would be a great feature.

@atn832
Copy link

atn832 commented Feb 16, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants