From facc0ea25768a83ee8f17a1a3599653e083bb98a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Harrault?= <benoit@harrault.fr> Date: Mon, 10 May 2021 11:38:44 +0200 Subject: [PATCH] Fix/improve layout --- android/gradle.properties | 4 ++-- lib/screens/game_pick_word.dart | 31 ++++++++++++++----------------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/android/gradle.properties b/android/gradle.properties index b5327e1..8428396 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.7 -app.versionCode=31 +app.versionName=0.1.8 +app.versionCode=32 diff --git a/lib/screens/game_pick_word.dart b/lib/screens/game_pick_word.dart index 4dafac4..8686e58 100644 --- a/lib/screens/game_pick_word.dart +++ b/lib/screens/game_pick_word.dart @@ -131,31 +131,28 @@ class GamePickWordPage extends StatelessWidget { } Container _buildImageContainer(String image) { + double imageSize = 130; + String imageAsset = 'assets/placeholder.png'; if (image != null) { imageAsset = 'assets/images/'+image; } return Container( - child: FlatButton( - color: Colors.teal, - child: Container( - margin: EdgeInsets.all(2), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(8), - border: Border.all( - color: Colors.teal, - width: 8, - ), - ), - child: Image( - image: AssetImage(imageAsset), - width: 150, - height: 150, - fit: BoxFit.fill - ), + margin: EdgeInsets.all(2), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + border: Border.all( + color: Colors.teal, + width: 8, ), ), + child: Image( + image: AssetImage(imageAsset), + width: imageSize, + height: imageSize, + fit: BoxFit.fill + ), ); } -- GitLab