yang-f / flutter_svg_provider

Use svg as image provider.
https://pub.dev/packages/flutter_svg_provider
Apache License 2.0
47 stars 72 forks source link

Add <style> element #35

Open Jean28518 opened 2 years ago

Jean28518 commented 2 years ago

Hey :) First of all, good work!

I have the issue that a specific .svg can't be rendered correctly:

══╡ EXCEPTION CAUGHT BY SVG ╞═══════════════════════════════════════════════════════════════════════
The following UnimplementedError was thrown in parseSvgElement:
The <style> element is not implemented in this library.

Style elements are not supported by this library and the requested SVG may not render as intended.
If possible, ensure the SVG uses inline styles and/or attributes (which are supported), or use a
preprocessing utility such as svgcleaner to inline the styles for you.

Picture key: /usr/share/icons/hicolor/scalable/apps/thunderbird.svg
════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: unhandled element filter; Picture key: /usr/share/icons/hicolor/scalable/apps/thunderbird.svg

The rendered output: image

The file to render: thunderbird

So my proposal would be, to add the implementation for the