Skip to content

How to set Container colors? #76

Closed Answered by rydmike
zyllus17 asked this question in Q&A
Aug 20, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hi @zyllus17 and thanks for your question,

Despite its name, ColorScheme.primaryContainer is not a color used as light or dark color background for Flutter's Container widget by default in any way.

Here is what the Material 3 guide says about the usage of primaryContainer color:
"Primary container is applied to elements needing less emphasis than primary". To learn more about what that means see https://m3.material.io/styles/color/the-color-system/color-roles

The Container widget does not have a themed Color property or even a default Color, so it cannot be affected by ThemeData at all, and thus not by FlexColorScheme either that returns ThemeData. Container is typically used as lower lev…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@zyllus17
Comment options

@rydmike
Comment options

Answer selected by rydmike
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question This issue is a usage question and will be moved to the Discussions section.
2 participants
Converted from issue

This discussion was converted from issue #75 on August 20, 2022 17:55.