'Drawer's icons display in wrong color when light theme is active
For some reason icons display in wrong color in drawer when light theme is active. Icon theme is defined for both light and dark themes.
drawer code
return Drawer(
child: ListView(
children: [
ListTile(
title: Text(
"Messages",
style: menuTextStyle,
),
trailing: const Icon(Icons.home), // icon's theme aplies here
onTap: () {},
),
...
dark theme
final darkTheme = ThemeData(
brightness: Brightness.dark,
...
iconTheme: IconThemeData(color: Colors.greenAccent), // this works in drawer
);
light theme
final lightTheme = ThemeData(
brightness: Brightness.light,
...
iconTheme: IconThemeData(color: Colors.cyan), // this doesn't work in drawer when the light theme is active
);
When light theme is active icons displays in dark grey color but should be in cyan color. Why it doesn't work?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
