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

The Wheel Picker Crashes on Flutter Web #9

Closed
rydmike opened this issue Jun 3, 2020 · 3 comments
Closed

The Wheel Picker Crashes on Flutter Web #9

rydmike opened this issue Jun 3, 2020 · 3 comments

Comments

@rydmike
Copy link

rydmike commented Jun 3, 2020

Just wanted to let you know that the Color Wheel picker including in this very nice and feature rich color picker crashes on Flutter Web.
It crashes because the CustomPaint that uses SweepGradient API call that is is not yet implemented in Flutter WEB, this will cause a crash when this package is used on Flutter Web.

I had a similar issue and reported it here:
flutter/flutter#57752

My report also contains a rough example of how the color wheel/circle can be drawn using alternative API that works on Flutter WEB too. It is included in the above same issue report and can be seen in a DartPad here:
https://dartpad.dartlang.org/dc8a915f169455463e4e2016619e00bb
The DartPad shows this issue alongside a workaround. The example is MIT license so feel free to use it to make a fix for this component if you like. Sorry, I don't have time right now to look into the details of this package and make a pull request correction. (I might find some time for it later... depends 😀 )

My above Flutter issue report was a duplicate of an already known issue, the original issue report, that is being tracked by Flutter team, can be found here:
flutter/flutter#41389


Sidenote

A Flutter Web demo/example of a color picker that includes a similar wheel/circle component under its "any color" segment in its color picker, can be seen here:
https://rydmike.github.io/colorpickerdemo/#/
It is using the above described work-around to draw the color circle.

This Tweet thread explains its usage scenarios a bit.
https://twitter.com/RydMike/status/1266037341413654531

@nohli
Copy link
Collaborator

nohli commented Jul 4, 2021

@rydmike thanks for the explanation. Would you like to submit a pull request to fix this issue? 🙂

Edit: itome/flutter_circle_color_picker#8 (comment) says that this issue is fixed, is that correct?

@rydmike
Copy link
Author

rydmike commented Jul 6, 2021

Hi @nohli If I recall correctly the issue that caused this crash before should no longer be an issue in latest Flutter versions. The needed API should be implemented in Flutter Web now, so it should be OK as is with current implementation now.

I will double check if any issue of it in remains in this picker and get back to you. If it is OK, I will close this issue.

That said the alternative implementation I made might have some other benefits. Depends a bit on how you used the current approach. I can check that too, if there is a difference. I can make a PR and you can compare and see if you think it is a worth while change for this picker.

@AlexV525
Copy link
Member

AlexV525 commented Oct 8, 2021

Closed since we have accessibility issues about web, that confirms the compatibility for Flutter Web.

@AlexV525 AlexV525 closed this as completed Oct 8, 2021
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

3 participants