themeMode with custom theme
See original GitHub issueHi!
I’m trying to use a different color for the arrow icon when the themeMode is set. When the themeMode is set to dark, I want to have a white icon; when it is set to light, I want to have black icon.
Here is the code I have but it doesn’t seem to be working correctly; the background changes nicely between white and black but the arrow icon always remains white.
Any help is appreciated since I’m struggling a bit to understand how this works.
Bram
Here is the piece of code I’m using:
//This is the theme where I make a distinction between dark and light in the control.
const theme = deepMerge(grommet,
{
global: {
colors: {
brand: '#26547C',
focus: 'transparent', // added focus color,
control: {
dark: "#ffffff",
light: "#000000"
}
}
},
formField: {
label: {
size: 'small'
}
}
});
//Here is where I embed the menu inside of a Grommet component
<Grommet full={true} theme={theme} themeMode="dark">
<Menu label={title.pageTitle || 'Page Title Placeholder'} items={[{ label: 'logout' }]} />
</Grommet>
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Flutter Dynamic Theme: Dark Mode & Custom Themes - Medium
In MyApp class, assign your custom Dark and Light theme to 'darkTheme' and 'theme' attributes. Set 'themeMode' value as 'themeNotifier.getThemeMode()'.
Read more >How to Setup a Custom Theme in Flutter for a Light ... - YouTube
In this tutorial, we will learn how to setup or create light and dark flutter theme and a custom theme in flutter 2022....
Read more >App Theming in Flutter — Dark Mode/ Light Mode - ITNEXT
In this article, we will see how to Theme our apps in Flutter. ... a new file named “AppTheme.dart” and create two themes...
Read more >How to use Theme in Flutter - Dark and Custom Theme
In flutter, we can easily create and customize themes. We can play with default themes, design custom swatches, or use our own created...
Read more >Change Dynamically Theme In Flutter | by Shaiq khan
ThemeMode grants us the following states: Themes.light — We will create a new Themes() class and add ThemeData.light() with background color, button color, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks all for this amazing framework!
Woow awesome information and thank you for the quick reply. Now it makes more sense.
Bram