diff --git a/src/ui/flutter_app/lib/screens/game_page/game_page.dart b/src/ui/flutter_app/lib/screens/game_page/game_page.dart index 93301ec1..3c7fcc3b 100644 --- a/src/ui/flutter_app/lib/screens/game_page/game_page.dart +++ b/src/ui/flutter_app/lib/screens/game_page/game_page.dart @@ -22,7 +22,6 @@ import 'package:fluentui_system_icons/fluentui_system_icons.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:sanmill/generated/intl/l10n.dart'; -import 'package:sanmill/main.dart'; import 'package:sanmill/mill/game.dart'; import 'package:sanmill/mill/position.dart'; import 'package:sanmill/mill/rule.dart'; @@ -1346,39 +1345,30 @@ class _GamePageState extends State } IconData get iconArrow { - IconData iconArrow = FluentIcons.code_24_regular; - if (gameInstance.position.phase == Phase.gameOver) { switch (gameInstance.position.winner) { case PieceColor.white: - iconArrow = ltr + return ltr ? FluentIcons.toggle_left_24_regular : FluentIcons.toggle_right_24_regular; - break; case PieceColor.black: - iconArrow = ltr + return ltr ? FluentIcons.toggle_right_24_regular : FluentIcons.toggle_left_24_regular; - break; default: - iconArrow = FluentIcons.handshake_24_regular; - break; + return FluentIcons.handshake_24_regular; } } else { switch (gameInstance.sideToMove) { case PieceColor.white: - iconArrow = FluentIcons.chevron_left_24_regular; - break; + return FluentIcons.chevron_left_24_regular; + case PieceColor.black: - iconArrow = FluentIcons.chevron_right_24_regular; - break; + return FluentIcons.chevron_right_24_regular; default: - iconArrow = FluentIcons.code_24_regular; - break; + return FluentIcons.code_24_regular; } } - - return iconArrow; } Widget get board { @@ -1645,10 +1635,6 @@ class _GamePageState extends State @override void didChangeDependencies() { super.didChangeDependencies(); - routeObserver.subscribe( - this, - ModalRoute.of(context)! as PageRoute, - ); screenPaddingH = _screenPaddingH; ltr = Directionality.of(context) == TextDirection.ltr; } @@ -1664,6 +1650,9 @@ class _GamePageState extends State leading: DrawerIcon.of(context)?.icon, backgroundColor: Colors.transparent, elevation: 0.0, + iconTheme: IconThemeData( + color: AppTheme.drawerAnimationIconColor, + ), ), extendBodyBehindAppBar: true, backgroundColor: LocalDatabaseService.colorSettings.darkBackgroundColor, @@ -1688,7 +1677,6 @@ class _GamePageState extends State disposed = true; _engine.shutdown(); _animationController.dispose(); - routeObserver.unsubscribe(this); LocalDatabaseService.listenPreferences.removeListener(_refeshEngine); super.dispose(); } diff --git a/src/ui/flutter_app/lib/screens/help_screen.dart b/src/ui/flutter_app/lib/screens/help_screen.dart index fea7f970..490504e9 100644 --- a/src/ui/flutter_app/lib/screens/help_screen.dart +++ b/src/ui/flutter_app/lib/screens/help_screen.dart @@ -20,6 +20,9 @@ class HelpScreen extends StatelessWidget { color: AppTheme.helpTextColor, ), ), + iconTheme: IconThemeData( + color: AppTheme.helpTextColor, + ), ), backgroundColor: LocalDatabaseService.colorSettings.darkBackgroundColor, body: SingleChildScrollView( diff --git a/src/ui/flutter_app/lib/shared/custom_drawer/src/widget.dart b/src/ui/flutter_app/lib/shared/custom_drawer/src/widget.dart index 210c8f43..e1f5e343 100644 --- a/src/ui/flutter_app/lib/shared/custom_drawer/src/widget.dart +++ b/src/ui/flutter_app/lib/shared/custom_drawer/src/widget.dart @@ -126,7 +126,6 @@ class _CustomDrawerState extends State final _drawerOverlay = IconButton( icon: AnimatedIcon( icon: AnimatedIcons.arrow_menu, - color: AppTheme.drawerAnimationIconColor, progress: ReverseAnimation(_animationController), ), tooltip: MaterialLocalizations.of(context).openAppDrawerTooltip,