Skip to content
Snippets Groups Projects
Commit 208e88f2 authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Add cell animation on set value

parent 9b608899
No related branches found
No related tags found
1 merge request!48Resolve "Add animations on cells"
Pipeline #1936 passed
This commit is part of merge request !48. Comments created here will be created in the context of that merge request.
org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
app.versionName=0.0.43 app.versionName=0.0.44
app.versionCode=43 app.versionCode=44
Add cell animation on value change
Ajout d'animation de cellule au changement de valeur
...@@ -30,9 +30,16 @@ class Cell { ...@@ -30,9 +30,16 @@ class Cell {
border: borders, border: borders,
), ),
child: GestureDetector( child: GestureDetector(
child: Image( child: AnimatedSwitcher(
image: AssetImage(imageAsset), duration: const Duration(milliseconds: 100),
fit: BoxFit.fill 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: () { onTap: () {
if (col != null && row != null) { if (col != null && row != null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment