dnfield / flutter_svg

SVG parsing, rendering, and widget library for Flutter
MIT License
1.67k stars 459 forks source link

Major Crash on Mobile Web when using SvgPicture.asset with flutter_svg #1032

Open SzymonDziak opened 9 months ago

SzymonDziak commented 9 months ago

Description

When using SvgPicture.asset to render SVG images on a mobile web application, the app experiences a major crash. This issue seems to occur only on the mobile web and not on other platforms.

Steps to Reproduce

  1. Use SvgPicture.asset to load and display an SVG image in a Flutter application.
  2. Run the application on a mobile web browser.
  3. Navigate to the page where the SVG is rendered.

Expected results:

The SVG image should render correctly without causing any crashes.

Actual results:

The application crashes when attempting to render the SVG image.

Additional Information

Example Code

dart

Padding(
padding: const EdgeInsets.only(right: 12.0),
child: SvgPicture.asset(
"assets/svg/open_right_lock.svg",
width: 22,
colorFilter: ColorFilter.mode(
CustomColor.textFieldText.value,
BlendMode.srcATop,
),
),
)

Link to the icon used in the example code: https://fonts.google.com/icons?selected=Material+Symbols+Outlined:lock_open_right:FILL@0;wght@400;GRAD@0;opsz@24&icon.query=open+ri&icon.platform=web

dnfield commented 9 months ago

Could you crete a dartpad example?