From f9daacf726974673627d7cc1795df6933968c78a Mon Sep 17 00:00:00 2001 From: Shai Date: Sat, 10 Feb 2024 19:28:40 +0200 Subject: [PATCH] fixed bloons visuals for small screens --- lib/main.dart | 3 +-- lib/presentation/screens/misc/favorite_screen.dart | 4 +--- lib/presentation/widgets/bloons/bloons_grid.dart | 1 + lib/utilities/layout_presets.dart | 12 ++++++------ 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 94f9889..742d4ac 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -129,8 +129,7 @@ class _MyHomePageState extends State { appBar: AppBar( title: Consumer( builder: (context, globalState, child) { - // return Text(globalState.currentTitle); - return Text(MediaQuery.of(context).size.width.toString()); + return Text(globalState.currentTitle); }, ), actions: [ diff --git a/lib/presentation/screens/misc/favorite_screen.dart b/lib/presentation/screens/misc/favorite_screen.dart index c154d06..f48ab0e 100644 --- a/lib/presentation/screens/misc/favorite_screen.dart +++ b/lib/presentation/screens/misc/favorite_screen.dart @@ -31,9 +31,7 @@ class _FavoriteScreenState extends State { ); return Scaffold( appBar: AppBar( - // title: const Text('Favorites'), - title: Text(MediaQuery.of(context).size.width.toString()), - + title: const Text('Favorites'), actions: [ Consumer( builder: (context, favoriteState, child) { diff --git a/lib/presentation/widgets/bloons/bloons_grid.dart b/lib/presentation/widgets/bloons/bloons_grid.dart index 0cecc15..c80a208 100644 --- a/lib/presentation/widgets/bloons/bloons_grid.dart +++ b/lib/presentation/widgets/bloons/bloons_grid.dart @@ -71,6 +71,7 @@ class BloonsGrid extends StatelessWidget { child: Center( child: ListTile( titleAlignment: ListTileTitleAlignment.center, + contentPadding: const EdgeInsets.symmetric(horizontal: 8.5), leading: ImageOutliner( imageName: bloon.image, imagePath: bloonImage(bloon.image), diff --git a/lib/utilities/layout_presets.dart b/lib/utilities/layout_presets.dart index 7c8a508..6855f32 100644 --- a/lib/utilities/layout_presets.dart +++ b/lib/utilities/layout_presets.dart @@ -17,10 +17,10 @@ Map presetUS = { skinCrossCount: 1, skinAspectRatio: 1.0, // bloons - bloonCrossCount: 1, - bloonAspectRatio: 5.5, + bloonCrossCount: 2, + bloonAspectRatio: 3.0, bloonTitleStyle: smallTitleStyle.copyWith(fontSize: 12.0), - bloonImageWidth: 28.0, + bloonImageWidth: 18.5, // bosses bossCrossCount: 1, bossAspectRatio: 4.3, @@ -53,9 +53,9 @@ Map presetXS = { skinAspectRatio: 1.0, // bloons bloonCrossCount: 2, - bloonAspectRatio: 2.7, - bloonTitleStyle: smallTitleStyle.copyWith(fontSize: 15.0), - bloonImageWidth: 28.0, + bloonAspectRatio: 3.0, + bloonTitleStyle: smallTitleStyle.copyWith(fontSize: 13.0), + bloonImageWidth: 18.5, // bosses bossCrossCount: 1, bossAspectRatio: 4.3,