I would like to achieve that the icon of my dark / light button changes accordingly when the mode is activated, that is, I would like a sun icon in ligt mode and a moon icon in dark mode. I found different solutions for this, but I can't use them, maybe who can help? It could be that the code is broken down incorrectly because I'm a newbie and I can't get it right: /
Padding(
padding: const EdgeInsets.only(left: 40),
child: ClipOval(
child: Material(
color: Color(0xFF282C39),
child: InkWell(
splashColor: Colors.blue,
child: SizedBox(width: 32, height: 32, child: Icon(Icons.brightness_2, size: 20, color: Colors.white)),
onTap: () {
isDark
? Magazin.of(context)!
.setBrightness(Brightness.light)
: Magazin.of(context)!
.setBrightness(Brightness.dark);
},
),
),
),
),