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

Not every occurence of accentColor and primaryColor is changed #39

Open
dvorapa opened this issue Dec 27, 2019 · 4 comments
Open

Not every occurence of accentColor and primaryColor is changed #39

dvorapa opened this issue Dec 27, 2019 · 4 comments

Comments

@dvorapa
Copy link

dvorapa commented Dec 27, 2019

When changing theme using this package, not everything is changed properly, e.g. FloatingActionButtons remain with the old color. My code:

DynamicTheme.of(context).setThemeData(Theme.of(context).copyWith(
  primaryColor: Colors.red,
  accentColor: Colors.red
));
@SebastienBtr
Copy link

use primarySwatch instead of primaryColor

@dvorapa
Copy link
Author

dvorapa commented Jul 19, 2020

Changing primarySwatch leaves these things blue, that's why I use primaryColor.

@SebastienBtr
Copy link

it works fine for me with primarySwatch

@dvorapa
Copy link
Author

dvorapa commented Jul 19, 2020

If you need to have more advanced theme and not just two-color theme, primarySwatch is not a viable option. Flutter docs then recommend using these two instead.

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

2 participants