flutter_svg icon indicating copy to clipboard operation
flutter_svg copied to clipboard

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

Open SzymonDziak opened this issue 1 year ago • 1 comments

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

  • Flutter version: 3.16.0
  • flutter_svg version: 2.0.9
  • Browser(s) tested: Chrome, Safari, DuckDuckGo
  • Can't find any error logs or stack traces that occur during the crash as it only happens on mobile browsers.

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

SzymonDziak avatar Jan 18 '24 16:01 SzymonDziak

Could you crete a dartpad example?

dnfield avatar Jan 18 '24 17:01 dnfield