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

colorFilter not working in Flutter Web Apps on mobile devices with iOS 17.2 on Safari anymore #1079

Open
chrisDK1977 opened this issue Jun 12, 2024 · 6 comments

Comments

@chrisDK1977
Copy link

chrisDK1977 commented Jun 12, 2024

SvgPicture.asset(pathToAsset, colorFilter: ColorFilter.mode(Color(0xFFFF0000), BlendMode.srcIn));

... tints the asset red on iOS 15 on Safari on mobile devices but not when mobile device is running on safari on iOS17.2 it does not change the color.

@jannisnikoy
Copy link

I think this might be a change in Flutter 3.22 that broke it. Noticed the same issue after upgrading our project to latest Flutter SDK.

@chrisDK1977
Copy link
Author

@dnfield Should I open an issue in the flutter project or is this project the correct place for the bug?

@chrishibler
Copy link

I'm seeing the same thing. It works as expected in desktop Chrome, but not on iOS web.

@Hmmza-tariq
Copy link

I am also facing this issue, anyone knows the solution?

@Hmmza-tariq
Copy link

Hmmza-tariq commented Sep 11, 2024

Update:
This solution worked for me:
flutter run -d chrome --web-renderer=canvaskit
flutter build web --release --web-renderer canvaskit

@v1ct0r
Copy link

v1ct0r commented Jan 12, 2025

I managed to solve it with "ColorFiltered". That changes color in SVGs in web app

ColorFiltered(
    colorFilter: ColorFilter.mode(Color(0xFF00CAA6), BlendMode.srcIn),
    child: SvgPicture.asset('assetpath.svg'),
),

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

5 participants