flutter_svg
flutter_svg copied to clipboard
Major Crash on Mobile Web when using SvgPicture.asset with flutter_svg
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
- Use
SvgPicture.assetto load and display an SVG image in a Flutter application. - Run the application on a mobile web browser.
- 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
Could you crete a dartpad example?