From 1c00408b7eb937add3bccd5990a6e87a2ffd976d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Harrault?= <benoit@harrault.fr> Date: Sat, 10 Apr 2021 15:48:44 +0200 Subject: [PATCH] Reduce font size in menus, fix orientation --- android/gradle.properties | 4 ++-- lib/cpu_level_page.dart | 6 +++--- lib/home_page.dart | 9 +++++---- lib/main.dart | 7 ++++++- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/android/gradle.properties b/android/gradle.properties index 9ff93b6..7ac7a94 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -2,5 +2,5 @@ org.gradle.jvmargs=-Xmx1536M android.enableR8=true android.useAndroidX=true android.enableJetifier=true -app.versionName=1.0.2 -app.versionCode=3 +app.versionName=1.0.3 +app.versionCode=4 diff --git a/lib/cpu_level_page.dart b/lib/cpu_level_page.dart index af76d83..05a5a71 100644 --- a/lib/cpu_level_page.dart +++ b/lib/cpu_level_page.dart @@ -26,7 +26,7 @@ class CpuLevelPage extends StatelessWidget { 'βΊοΈ FACILE', style: Theme.of(context) .textTheme - .display2 + .display1 .copyWith(color: Colors.black), ), onPressed: () { @@ -48,7 +48,7 @@ class CpuLevelPage extends StatelessWidget { 'π€ DIFFICILE', style: Theme.of(context) .textTheme - .display2 + .display1 .copyWith(color: Colors.white), ), onPressed: () { @@ -70,7 +70,7 @@ class CpuLevelPage extends StatelessWidget { 'π€― TRES DIFFICILE', style: Theme.of(context) .textTheme - .display2 + .display1 .copyWith(color: Colors.white), ), onPressed: () { diff --git a/lib/home_page.dart b/lib/home_page.dart index 3940ea9..b1b865a 100644 --- a/lib/home_page.dart +++ b/lib/home_page.dart @@ -23,7 +23,7 @@ class HomePage extends StatelessWidget { 'π§ 2 JOUEURS π§', style: Theme.of(context) .textTheme - .display2 + .display1 .copyWith(color: Colors.white), ), onPressed: () { @@ -43,7 +43,7 @@ class HomePage extends StatelessWidget { 'π§ 1 JOUEUR π€', style: Theme.of(context) .textTheme - .display2 + .display1 .copyWith(color: Colors.white), ), onPressed: () { @@ -58,11 +58,12 @@ class HomePage extends StatelessWidget { ), FlatButton( color: Colors.white, + padding: EdgeInsets.all(15), child: Text( - 'DEMO', + 'π€ DEMO π€', style: Theme.of(context) .textTheme - .display2 + .display1 .copyWith(color: Colors.black), ), onPressed: () { diff --git a/lib/main.dart b/lib/main.dart index f6f5777..19115a1 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,9 +1,14 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:puissance4/cpu_level_page.dart'; import 'package:puissance4/home_page.dart'; import 'package:puissance4/match_page.dart'; -void main() => runApp(MyApp()); +void main() { + WidgetsFlutterBinding.ensureInitialized(); + SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]) + .then((value) => runApp(MyApp())); +} class MyApp extends StatelessWidget { @override -- GitLab