diff --git a/lib/views/create_game_view.dart b/lib/views/create_game_view.dart index 565d68a..f514465 100644 --- a/lib/views/create_game_view.dart +++ b/lib/views/create_game_view.dart @@ -70,7 +70,9 @@ class _CreateGameState extends State { Text( selectedMode == null ? 'Wähle einen Modus' - : (selectedMode! ? '101 Punkte' : 'Unbegrenzt'), + : (selectedMode! + ? '${Globals.pointLimit} Punkte' + : 'Unbegrenzt'), ), const SizedBox(width: 3), const CupertinoListTileChevron(), @@ -290,16 +292,13 @@ class _CreateGameState extends State { isPointsLimitEnabled: selectedMode!, ); final index = await gameManager.addGameSession(gameSession); - print('index des spiels: $index'); if (context.mounted) { Navigator.pushReplacement( context, CupertinoPageRoute( builder: (context) => ActiveGameView( gameSession: gameManager.gameList[index]))); - } else { - print('Context is not mounted'); - } + } else {} }, ), ), diff --git a/lib/views/main_menu_view.dart b/lib/views/main_menu_view.dart index 7c7e019..76d360d 100644 --- a/lib/views/main_menu_view.dart +++ b/lib/views/main_menu_view.dart @@ -1,6 +1,7 @@ import 'package:cabo_counter/data/game_manager.dart'; import 'package:cabo_counter/services/local_storage_service.dart'; import 'package:cabo_counter/utility/custom_theme.dart'; +import 'package:cabo_counter/utility/globals.dart'; import 'package:cabo_counter/views/active_game_view.dart'; import 'package:cabo_counter/views/create_game_view.dart'; import 'package:cabo_counter/views/settings_view.dart'; @@ -185,7 +186,7 @@ class _MainMenuViewState extends State { /// Translates the game mode boolean into the corresponding String. /// If [pointLimit] is true, it returns '101 Punkte', otherwise it returns 'Unbegrenzt'. String _translateGameMode(bool pointLimit) { - if (pointLimit) return '101 Punkte'; + if (pointLimit) return '${Globals.pointLimit} Punkte'; return 'Unbegrenzt'; } diff --git a/pubspec.yaml b/pubspec.yaml index 0000be1..4ed1f31 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: cabo_counter description: "Mobile app for the card game Cabo" publish_to: 'none' -version: 0.2.5+195 +version: 0.2.6+197 environment: sdk: ^3.5.4