From e7387b5db442efa7393aea269db3fc2c5710e46a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Harrault?= <benoit@harrault.fr> Date: Fri, 21 May 2021 10:43:32 +0200 Subject: [PATCH] Make text items clickable (get random value) --- android/gradle.properties | 4 ++-- lib/screens/home.dart | 42 +++++++++++++++++++-------------------- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/android/gradle.properties b/android/gradle.properties index 7e20d00..80ac9fe 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.2.6 -app.versionCode=12 +app.versionName=1.2.7 +app.versionCode=13 diff --git a/lib/screens/home.dart b/lib/screens/home.dart index defa3bd..7f99712 100644 --- a/lib/screens/home.dart +++ b/lib/screens/home.dart @@ -95,11 +95,7 @@ class Home extends StatelessWidget { mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, children: [ - FlatButton( - onPressed: () => pickLetter(myProvider), - child: Text("🔀"), - ), - myProvider.letter == '' ? Container() : Container( + Container( margin: EdgeInsets.all(15), padding: EdgeInsets.all(15), decoration: BoxDecoration( @@ -110,12 +106,15 @@ class Home extends StatelessWidget { width: 4, ), ), - child: Text( - myProvider.letter, - style: TextStyle( - fontSize: 40, - fontWeight: FontWeight.w600, - color: Colors.black, + child: FlatButton( + onPressed: () => pickLetter(myProvider), + child: Text( + myProvider.letter == '' ? "🔀" : myProvider.letter, + style: TextStyle( + fontSize: 40, + fontWeight: FontWeight.w600, + color: Colors.black, + ), ), ), ), @@ -133,11 +132,7 @@ class Home extends StatelessWidget { mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, children: [ - FlatButton( - onPressed: () => pickCategory(myProvider), - child: Text("🔀"), - ), - myProvider.category == '' ? Container() : Container( + Container( margin: EdgeInsets.all(5), padding: EdgeInsets.all(5), decoration: BoxDecoration( @@ -148,12 +143,15 @@ class Home extends StatelessWidget { width: 4, ), ), - child: Text( - myProvider.category, - style: TextStyle( - fontSize: 40, - fontWeight: FontWeight.w600, - color: Colors.black, + child: FlatButton( + onPressed: () => pickCategory(myProvider), + child: Text( + myProvider.category == '' ? "🔀" : myProvider.category, + style: TextStyle( + fontSize: 40, + fontWeight: FontWeight.w600, + color: Colors.black, + ), ), ), ), -- GitLab