Skip to content

feat: Add material color support in Mirai #123

@divyanshub024

Description

@divyanshub024

Description

Currently, Mirai allows colors to be applied using hex strings (e.g., "#FFFFFF") or theme styles (e.g., "primary"). To enhance usability, we should also support Material Colors directly by name.

For example, users should be able to pass simple color names like:
• "white"
• "black"
• "red"
…and other basic Material color names.

Note: We don't need to add shade colors like black24.

Proposed Solution
• Extend the color parsing logic to recognize Material color names.
• Map these names to their corresponding hex values or Material color codes within the framework.

Benefits
• Ease of use: Developers familiar with Material Design can apply colors without needing to reference hex codes.
• Consistency: Aligns Mirai with the Material Design ecosystem, making it more intuitive for Flutter developers.
• Improved readability: Code becomes cleaner and easier to understand.

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions