Skip to content

How to change onPrimary Color #211

Closed Answered by rydmike
Luwx asked this question in Q&A
Oct 30, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @Luwx and thanks for your question!

TLDR

How about just setting onPrimary to Colors.white?

Longer explanation

With the FlexColorScheme API you can easily override the generated colors, or the pre-defined ones set via scheme or colors API, it even overrides the color set in a passed colorScheme.

For example:

      theme: FlexThemeData.light(
        useMaterial3: true,
        scheme: FlexScheme.redWine,
        onPrimary: Colors.yellow, // <== override onPrimary color to YELLOW
        blendLevel: 2,
        appBarOpacity: 0.98,
        subThemesData: const FlexSubThemesData(
          inputDecoratorRadius: 8,
          inputDecoratorPrefixIconSchemeColor: SchemeColor.primary,
        …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Luwx
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
None yet
2 participants