diff --git a/lib/pages/home.dart b/lib/pages/home.dart index 7b75fc3..f7cbba4 100644 --- a/lib/pages/home.dart +++ b/lib/pages/home.dart @@ -48,20 +48,23 @@ class _MyHomePageState extends State { style: TextStyle(fontWeight: FontWeight.bold), ), actions: [ - IconButton( - icon: Icon( - _isDarkTheme ? Icons.dark_mode : Icons.light_mode, + Padding( + padding: const EdgeInsets.only(right: 16, top:1), + child: IconButton( + icon: Icon( + _isDarkTheme ? Icons.dark_mode : Icons.light_mode, + ), + onPressed: () { + setState(() { + _isDarkTheme = !_isDarkTheme; + }); + final themeMode = + Theme.of(context).brightness == Brightness.dark + ? AdaptiveThemeMode.light + : AdaptiveThemeMode.dark; + AdaptiveTheme.of(context).setThemeMode(themeMode); + }, ), - onPressed: () { - setState(() { - _isDarkTheme = !_isDarkTheme; - }); - final themeMode = - Theme.of(context).brightness == Brightness.dark - ? AdaptiveThemeMode.light - : AdaptiveThemeMode.dark; - AdaptiveTheme.of(context).setThemeMode(themeMode); - }, ), ], ),