Replies: 1 comment
-
Hmmm... Just tried it without "Color Match" set to true and I still don't get all the Themes for Cards, Icons, etc. Should I be adding these manually? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello -
I've exported a color scheme using Material Builder and in here, I notice that there aren't any
CardTheme
orIconTheme
specified when thetheme(ColorScheme colorScheme)
method is called (invoked when light / dark mode is called).For example, for
Card
'sThemeData
, Material 3 suggests (see: Card Specs)color: colorScheme.surfaceContainerLow
,surfaceTintColor: colorScheme.surfaceTint
, andshadowColor: colorScheme.shadow
,It is ONLY when a
.copyWith
is called with the above overrides does the Material3 suggestions for Card theme are met. What I mean is unless I override the each instance ofCard
tosurfaceContainerLow
in my App, the Theme doesn't use the recommended color - this does not seem right to me...So within the Flutter code generated by the the Theme Builder
Q: Does it mean that, for each widget, I have to create corresponding ThemeData objects? Is this the correct practice?
Appreciate any feedback.
OOPS! Forgot to mention that when I generated the Flutter files from Material-Builder, I had the checkbox "Color Match" set to
true
. Not sure if that's why there's noappBarTheme
orcardTheme
in the generated ThemeData...Beta Was this translation helpful? Give feedback.
All reactions