Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Material] Applying a color scheme to a flutter app is difficult. #31284

Closed
@johnsonmh

Description

@johnsonmh

The Material Design spec defines the colors of components according to the the color system.
nYXGWq02dBU.

In Flutter, we have a class that represents the color system (color_scheme.dart). But when you create a ColorScheme object and assign it to ThemeData.colorScheme, it is only used to apply color defaults to a couple of components.

There are lots of color related parameters in theme_data.dart, like primaryColor, accentColor, hintColor etc. Rather than worry about these...

We should have a way to create a ThemeData and pass in a single ColorScheme object, and then have all of the Material Components in our Flutter app pull from that ColorScheme. Unless users specify a color directly to a widget (which should always be honored).

This will be especially convenient if users want to create an entirely new darkColorScheme for creating a darkTheme, they can specify it once at the top of their apps, and have all of the components update automatically.

Metadata

Metadata

Assignees

Labels

a: qualityA truly polished experiencecustomer: crowdAffects or could affect many people, though not necessarily a specific customer.f: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions