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
Support ShaderMask on web #44152
Comments
Hi! Could I try taking this task? Thanks! |
Check this sample I created: https://dartpad.dev/5536c9d19d9ea15874416dc4835ba06d , it works fine in mobile. |
Sorry for late response. TBH I've no idea what shader mask does, so I cannot provide much context. I imagine the change would be similar to flutter/engine@3381392. For the CanvasKit backend it's likely a matter of forwarding the right method call. For the HTML backend the trick is to find the HTML/canvas equivalent of this effect. |
Anything new on supporting ShaderMask for Web? Looks like a great widget to use. |
Still broken as of now with the latest beta. Getting the following error 'Another exception was thrown: PersistedOffset: is in an unexpected state.' when using the ShaderMask() widget. The properties my widget has are just the shaderCallback and a child. Returning null or a LinearGradient in the shaderCallback makes no difference for the error. Flutter (Channel beta, v1.17.0-3.4.pre, on Mac OS X 10.15.4 19E287, locale en-GB) |
I'm new to flutter development. is ShaderMask is supported in 1.19.0-4.2.pre- channel beta ? |
ShaderMask is not supported on web yet, but it is supported on other platforms. If someone adds support on web, this issue will be updated. |
@diegoveloper , thanks for patience on this issue. We have a fix, tested with your DartPad sample. It should land shortly in master. Great sample btw. |
@ferhatb Nice! I wonder whether it will make hnvn/flutter_shimmer#25 shimmer package workable (on web)? |
Probably, since the only problem there was ShaderMask |
Closing this as it seems from #52967 (comment) and @ferhatb's comment above that ShaderMask is now supported on web. Let me know if that's not right! |
I'm still facing errors with ShaderMasks on Flutter Web Builds. Has any fix arrived for this now? It seems to work fine on Emulators and Physical Devices but not on the Web~. Even Windows Desktop Flutter App seems to work. |
@arvind-iyer-2001 please file a new issue with a small sample to reproduce. Some fixes may have only landed on master channel and propagating through dev->beta->stable releases. |
It does not work for me for web applications pd. In my work they only let me use the stable branch :(
|
Thank you guys soo much :)) it also works in beta channel |
Is there any plan to have this on the stable channel? |
Appears to be not working as expected in some mobile browsers. |
@justinmc Its very simple, just an image with a LinearGradient from black to transparent. In some mobile browsers the gradient don't work. Its reproducible in chrome in the Device Toolbar. Some Mobile aspects the gradient work as expected, in others (like Pixel 2) don't. In every mobile browser that i tested physically does not work as well. But i can open in a new issue if you really want. |
Yes please if you have time! That way this bug will get triaged and someone will look at it. |
As the ShaderMask should work again (flutter/flutter#44152), the notice that it would not work was removed
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
I discovered in the CupertinoContextMenu PR that Flutter Web does not support the ShaderMask widget right now. Running tests that created this widget caused assertion unimplemented errors for
pushShaderMask
. See a Cirrus run.We should implement support for ShaderMask and remove the conditional
skipTest: isBrowser
in context_menu_test.dart.The text was updated successfully, but these errors were encountered: