diff --git a/android/gradle.properties b/android/gradle.properties index c7c59fb1a34268f8dcc640e2c52dc7a784cee5bc..846d702b50b10ace4283737488aa38b8c54b8da9 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true -app.versionName=0.1.0 -app.versionCode=27 +app.versionName=0.1.1 +app.versionCode=28 diff --git a/fastlane/metadata/android/en-US/changelogs/28.txt b/fastlane/metadata/android/en-US/changelogs/28.txt new file mode 100644 index 0000000000000000000000000000000000000000..cc64aed1ca78fc583a1c501d8ad502bb0f667774 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/28.txt @@ -0,0 +1 @@ +Fix "all" categories game theme. diff --git a/fastlane/metadata/android/fr-FR/changelogs/28.txt b/fastlane/metadata/android/fr-FR/changelogs/28.txt new file mode 100644 index 0000000000000000000000000000000000000000..4f90f60ea3328843e86e2bd21bea296498a2f11a --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/28.txt @@ -0,0 +1 @@ +Correction sur le jeu "toutes catégories". diff --git a/lib/cubit/game_cubit.dart b/lib/cubit/game_cubit.dart index ec76c9a454cef0928451d07f27c794160dc4153a..eba2fa632027ae24036baeaea0dee28faf47f1da 100644 --- a/lib/cubit/game_cubit.dart +++ b/lib/cubit/game_cubit.dart @@ -100,7 +100,7 @@ class GameCubit extends HydratedCubit<GameState> { @override Map<String, dynamic>? toJson(GameState state) { return <String, dynamic>{ - 'currentGame': state.currentGame.toJson(), + 'currentGame': state.currentGame, }; } } diff --git a/lib/data/fetch_data_helper.dart b/lib/data/fetch_data_helper.dart index 405199e8b8d710a4df72366bd155135f61a42014..db8b430300bfeccf349eadc2d2b807262745160e 100644 --- a/lib/data/fetch_data_helper.dart +++ b/lib/data/fetch_data_helper.dart @@ -101,8 +101,8 @@ class FetchDataHelper { List<GameItem> items = _mapping; // Remove unwanted categories if theme is selected - if (themeCode != '') { - final GameTheme gameTheme = getTheme(code: themeCode); + final GameTheme gameTheme = getTheme(code: themeCode); + if (gameTheme.categories.isNotEmpty) { for (GameItem item in items) { item.isCategory.removeWhere((Category category) => (!gameTheme.categories.map((Category c) => c.key).contains(category.key))); diff --git a/lib/models/data/game_item.dart b/lib/models/data/game_item.dart index f1c8cc3075e4363831920fa2842750a4772a1819..02e614d6a547c3c8fd758181e723063dcbae97fa 100644 --- a/lib/models/data/game_item.dart +++ b/lib/models/data/game_item.dart @@ -19,9 +19,9 @@ class GameItem { Map<String, dynamic>? toJson() { return <String, dynamic>{ - 'item': item.toJson(), - 'isCategory': isCategory.toString(), - 'isNotCategory': isNotCategory.toString(), + 'item': item, + 'isCategory': isCategory, + 'isNotCategory': isNotCategory, }; } } diff --git a/lib/models/data/game_theme.dart b/lib/models/data/game_theme.dart index e0ecc61546af53c8555bfa01e4ddd09043dbc171..40a6ce7c87e853873c84a934ae98c04f99525583 100644 --- a/lib/models/data/game_theme.dart +++ b/lib/models/data/game_theme.dart @@ -17,7 +17,7 @@ class GameTheme { Map<String, dynamic>? toJson() { return <String, dynamic>{ 'code': code, - 'categories': categories.toString(), + 'categories': categories, }; } } diff --git a/lib/ui/game/game_end.dart b/lib/ui/game/game_end.dart index 468138c30c1c25c450e9e7d1e5ec17aa4376d62f..2b5f9bab0844ab4da5d7d99bcf052915f2384446 100644 --- a/lib/ui/game/game_end.dart +++ b/lib/ui/game/game_end.dart @@ -15,36 +15,29 @@ class GameEndWidget extends StatelessWidget { final Game currentGame = gameState.currentGame; final Image decorationImage = Image( - image: AssetImage( - currentGame.gameWon ? 'assets/ui/game_win.png' : 'assets/ui/game_fail.png'), + image: AssetImage('assets/ui/game_${currentGame.gameWon ? 'win' : 'fail'}.png'), fit: BoxFit.fill, ); - return Container( - margin: const EdgeInsets.all(2), - padding: const EdgeInsets.all(2), - child: Table( - defaultColumnWidth: const IntrinsicColumnWidth(), - children: [ - TableRow( - children: [ - Column( - children: [decorationImage], - ), - Column( - children: [ - currentGame.animationInProgress == true - ? decorationImage - : const QuitGameButton() - ], - ), - Column( - children: [decorationImage], - ), - ], - ), - ], - ), + return Table( + defaultColumnWidth: const IntrinsicColumnWidth(), + children: [ + TableRow( + children: [ + Column( + children: [decorationImage], + ), + Column( + children: [ + currentGame.animationInProgress ? decorationImage : const QuitGameButton() + ], + ), + Column( + children: [decorationImage], + ), + ], + ), + ], ); }, ); diff --git a/lib/ui/layouts/parameters_layout.dart b/lib/ui/layouts/parameters_layout.dart index 52a22be1ae72fc340f846457f5d4c7774c712613..fcb13d17207c9b3d7feabfe785692f718766aa9d 100644 --- a/lib/ui/layouts/parameters_layout.dart +++ b/lib/ui/layouts/parameters_layout.dart @@ -37,7 +37,7 @@ class ParametersLayout extends StatelessWidget { lines.add(SizedBox(height: separatorHeight)); - if (canResume == false) { + if (!canResume) { // Start new game lines.add(const Expanded( child: StartNewGameButton(), diff --git a/lib/ui/widgets/actions/button_game_quit.dart b/lib/ui/widgets/actions/button_game_quit.dart index 7e8d2ecf9422477f38e43623308049e39676dd07..1a27356bdcc88c886ed07366722a8470f454fc34 100644 --- a/lib/ui/widgets/actions/button_game_quit.dart +++ b/lib/ui/widgets/actions/button_game_quit.dart @@ -8,7 +8,7 @@ class QuitGameButton extends StatelessWidget { @override Widget build(BuildContext context) { - return TextButton( + return ElevatedButton( child: const Image( image: AssetImage('assets/ui/button_back.png'), fit: BoxFit.fill, diff --git a/lib/ui/widgets/indicators/indicator_score.dart b/lib/ui/widgets/indicators/indicator_score.dart index 22fed0981228a39d312caf037039e91eed4b0ebd..d234ea78a9b5f8a7d4f8fcc5566380a434e23a1e 100644 --- a/lib/ui/widgets/indicators/indicator_score.dart +++ b/lib/ui/widgets/indicators/indicator_score.dart @@ -16,7 +16,7 @@ class ScoreIndicator extends StatelessWidget { final Color outlineColor = baseColor.darken(); return OutlinedText( - text: gameState.currentGame.score.toString(), + text: '${gameState.currentGame.score}', fontSize: 70, textColor: baseColor, outlineColor: outlineColor, diff --git a/pubspec.yaml b/pubspec.yaml index ca06f93135f5c8ea370bf0bf0177d4d08ecf3f5c..dc0a2371bcfcb243d0cd40f272ecf54c52050d86 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A sorting game application. publish_to: "none" -version: 0.1.0+27 +version: 0.1.1+28 environment: sdk: "^3.0.0"