From 4a66e21be32e571a08060139455bca48f8a9ec88 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Beno=C3=AEt=20Harrault?= <benoit@harrault.fr>
Date: Thu, 22 Aug 2024 12:35:35 +0200
Subject: [PATCH] Improve some UI

---
 android/gradle.properties                         |  4 ++--
 fastlane/metadata/android/en-US/changelogs/24.txt |  1 +
 fastlane/metadata/android/fr-FR/changelogs/24.txt |  1 +
 lib/ui/widgets/game/game_bottom.dart              |  7 +++++--
 lib/ui/widgets/game/game_tile.dart                | 15 +++++++++++++--
 pubspec.yaml                                      |  2 +-
 6 files changed, 23 insertions(+), 7 deletions(-)
 create mode 100644 fastlane/metadata/android/en-US/changelogs/24.txt
 create mode 100644 fastlane/metadata/android/fr-FR/changelogs/24.txt

diff --git a/android/gradle.properties b/android/gradle.properties
index dcf1298..33c4377 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=1.0.22
-app.versionCode=23
+app.versionName=1.0.23
+app.versionCode=24
diff --git a/fastlane/metadata/android/en-US/changelogs/24.txt b/fastlane/metadata/android/en-US/changelogs/24.txt
new file mode 100644
index 0000000..567e215
--- /dev/null
+++ b/fastlane/metadata/android/en-US/changelogs/24.txt
@@ -0,0 +1 @@
+Improve some UI.
diff --git a/fastlane/metadata/android/fr-FR/changelogs/24.txt b/fastlane/metadata/android/fr-FR/changelogs/24.txt
new file mode 100644
index 0000000..517652a
--- /dev/null
+++ b/fastlane/metadata/android/fr-FR/changelogs/24.txt
@@ -0,0 +1 @@
+Améliorations visuelles.
diff --git a/lib/ui/widgets/game/game_bottom.dart b/lib/ui/widgets/game/game_bottom.dart
index 12efb11..6ab3a21 100644
--- a/lib/ui/widgets/game/game_bottom.dart
+++ b/lib/ui/widgets/game/game_bottom.dart
@@ -20,8 +20,11 @@ class GameBottomWidget extends StatelessWidget {
         for (int value = 1; value <= values; value++) {
           final String assetName =
               'assets/skins/${currentGame.globalSettings.skin}_${currentGame.pairsFound.contains(value) ? value.toString() : 'unknown'}.png';
-          items.add(Image(
-            image: AssetImage(assetName),
+          items.add(Padding(
+            padding: const EdgeInsets.all(2),
+            child: Image(
+              image: AssetImage(assetName),
+            ),
           ));
         }
 
diff --git a/lib/ui/widgets/game/game_tile.dart b/lib/ui/widgets/game/game_tile.dart
index fc6419c..a748709 100644
--- a/lib/ui/widgets/game/game_tile.dart
+++ b/lib/ui/widgets/game/game_tile.dart
@@ -36,8 +36,19 @@ class GameTileWidget extends StatelessWidget {
                   BlocProvider.of<GameCubit>(context).tapOnTile(tileIndex);
                 }
               },
-              child: Image(
-                image: AssetImage(assetName),
+              child: AnimatedSwitcher(
+                duration: const Duration(milliseconds: 100),
+                transitionBuilder: (Widget child, Animation<double> animation) {
+                  return ScaleTransition(
+                    scale: animation,
+                    child: child,
+                  );
+                },
+                child: Image(
+                  image: AssetImage(assetName),
+                  fit: BoxFit.fill,
+                  key: ValueKey<int>(assetName.hashCode),
+                ),
               ),
             ),
           ),
diff --git a/pubspec.yaml b/pubspec.yaml
index 0030355..d6e42a2 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -3,7 +3,7 @@ description: A simple and classic memory game.
 
 publish_to: "none"
 
-version: 1.0.22+23
+version: 1.0.23+24
 
 environment:
   sdk: "^3.0.0"
-- 
GitLab