From 208e88f2b368ebf6886d2331568b4a960d1af6cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Beno=C3=AEt=20Harrault?= <benoit@harrault.fr>
Date: Thu, 2 Sep 2021 15:15:28 +0200
Subject: [PATCH] Add cell animation on set value

---
 android/gradle.properties                         |  4 ++--
 fastlane/metadata/android/en-US/changelogs/44.txt |  1 +
 fastlane/metadata/android/fr-FR/changelogs/44.txt |  1 +
 lib/entities/cell.dart                            | 13 ++++++++++---
 4 files changed, 14 insertions(+), 5 deletions(-)
 create mode 100644 fastlane/metadata/android/en-US/changelogs/44.txt
 create mode 100644 fastlane/metadata/android/fr-FR/changelogs/44.txt

diff --git a/android/gradle.properties b/android/gradle.properties
index 94a75b2..7e6b4cd 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.0.43
-app.versionCode=43
+app.versionName=0.0.44
+app.versionCode=44
diff --git a/fastlane/metadata/android/en-US/changelogs/44.txt b/fastlane/metadata/android/en-US/changelogs/44.txt
new file mode 100644
index 0000000..b0149be
--- /dev/null
+++ b/fastlane/metadata/android/en-US/changelogs/44.txt
@@ -0,0 +1 @@
+Add cell animation on value change
diff --git a/fastlane/metadata/android/fr-FR/changelogs/44.txt b/fastlane/metadata/android/fr-FR/changelogs/44.txt
new file mode 100644
index 0000000..a93e5c3
--- /dev/null
+++ b/fastlane/metadata/android/fr-FR/changelogs/44.txt
@@ -0,0 +1 @@
+Ajout d'animation de cellule au changement de valeur
diff --git a/lib/entities/cell.dart b/lib/entities/cell.dart
index 0cb2f97..080a535 100644
--- a/lib/entities/cell.dart
+++ b/lib/entities/cell.dart
@@ -30,9 +30,16 @@ class Cell {
         border: borders,
       ),
       child: GestureDetector(
-        child: Image(
-          image: AssetImage(imageAsset),
-          fit: BoxFit.fill
+        child: AnimatedSwitcher(
+          duration: const Duration(milliseconds: 100),
+          transitionBuilder: (Widget child, Animation<double> animation) {
+            return ScaleTransition(child: child, scale: animation);
+          },
+          child: Image(
+            image: AssetImage(imageAsset),
+            fit: BoxFit.fill,
+            key: ValueKey<int>(this.value),
+          ),
         ),
         onTap: () {
           if (col != null && row != null) {
-- 
GitLab