Is it possible to change the color from a specific icon locally, without using theme? something like
color: Brightness.light == "something" ? Colors.red : Colors.green
CodePudding user response:
You can get current theme mode from Theme.of(context).brightness
.
color: Theme.of(context).brightness == Brightness.dark
? Colors.white
: Colors.black,