-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
Color const constructor #694
Comments
Example At the moment we have to pass the colours in.
This is not allowed as there is no const constructor for the colour.
|
Hmm, the problem is that ColorUint8 has a Uint8List data member, so it's not const compatible as it is. |
I added ConstColorRgba8 and ConstColorRgb8, which are immutable const compatible Color classes. |
Added to published version 4.5.0 |
It would improve the devX if Color allowed a const constructor. The would allow defaults to be used in methods and other constructors, which at the moment won't work as defaults need to be const.
Happy to help but would like to know if this would be acceptable ahead of time.
The text was updated successfully, but these errors were encountered: