-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Currently, defining colors in Flutter out of the box requires using hexadecimal values (e.g., Color(0xffff0000)), which can be cumbersome and reduce code readability. While the Material and Cupertino libraries offer named colors (Colors in Material and CupertinoColors in Cupertino), these are tied to their respective design languages and may not be suitable for developers building applications for a different design language.
The upcoming introduction of dot shorthands in Dart presents an opportunity to simplify color usage significantly (e.g., color: .blue). However, without a set of predefined colors on the Color class itself, developers won't be able to take full advantage of this feature for one of its (potentially) most common use cases.
Overall, a basic color set could provide developers with a convenient and readable way to specify common colors, aligning Flutter with other popular UI frameworks and leveraging the upcoming dot shorthand notation in Dart.
Sub-issues
Metadata
Metadata
Assignees
Labels
Type
Projects
Status