0

Is icon color defined by iconTheme in ThemeDada? For instance, I defined it the way like this

  darkTheme: ThemeData.dark().copyWith(
    primaryColor: Color(0xff64ffda),
    iconTheme: IconThemeData(
      color: Colors.pink,
    ),
  ),

But the icon color is white in the folowing example for dark theme mode

Row(
  mainAxisSize: MainAxisSize.min,
  children: [
    Icon(
      Icons.save,
    ),
  ],
),
rozerro
  • 5,787
  • 9
  • 46
  • 94

1 Answers1

0
Row(
 mainAxisSize: MainAxisSize.min,
children: [
 Icon(
   Icons.save,
   color: Theme.of(context).iconTheme.color
  ),
 ],
),

This Code will use your IconColor

Shajko
  • 107
  • 2
  • 8