build method
Widget
build(
- BuildContext context,
- WidgetRef ref,
- ThemeSwitcherNotifier notifier,
- ThemeMode state,
override
Implementation
@override
Widget build(
BuildContext context,
WidgetRef ref,
ThemeSwitcherNotifier notifier,
ThemeMode state,
) {
return IconButton(
onPressed: () => notifier.switchTheme(
state == ThemeMode.light ? ThemeMode.dark : ThemeMode.light,
),
icon: Icon(state == ThemeMode.light ? PhosphorIcons.sun() : PhosphorIcons.moon()),
);
}