From 217fd15b7d3652cae1df7dc196fbe4f3c0e2ca9e Mon Sep 17 00:00:00 2001 From: appgramming Date: Thu, 27 Jul 2023 15:07:57 +0300 Subject: [PATCH 1/3] Fix some Favorites screen and app drawer issues --- lib/common/ui_strings.dart | 2 +- lib/screens/color_favorites_screen.dart | 9 ++++++--- lib/widgets/internal/app_drawer.dart | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/common/ui_strings.dart b/lib/common/ui_strings.dart index b32899d..00d9b63 100644 --- a/lib/common/ui_strings.dart +++ b/lib/common/ui_strings.dart @@ -92,7 +92,7 @@ const String goHome = 'Go Home'; // ----------------------------------------------------------------------------------------------- const String favoriteColorsScreenTitle = 'Favorite Colors'; -const String noFavoritesMessage = 'No favorite colors yet'; +const String noFavoritesMessage = 'No favorite colors yet\n\nGo back home and start tapping on'; const String removedFromFavorites = 'Removed from favorites'; const String undoRemoveFromFavorites = 'Undo'; const String clearFavorites = 'Clear favorites'; diff --git a/lib/screens/color_favorites_screen.dart b/lib/screens/color_favorites_screen.dart index 2b0ca12..b211d12 100644 --- a/lib/screens/color_favorites_screen.dart +++ b/lib/screens/color_favorites_screen.dart @@ -67,7 +67,10 @@ class _ColorFavoritesScreenState extends State { onPressed: () => setState(() => settings.colorFavoritesList.insert(index, randomColor)), ), ); - ScaffoldMessenger.of(context).showSnackBar(snackBar); + ScaffoldMessenger.of(context) + // The user may delete multiple colors in a row, so remove any existing snackbar before + ..removeCurrentSnackBar() + ..showSnackBar(snackBar); } @override @@ -112,13 +115,13 @@ class _ColorFavoritesScreenState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - const Icon(Icons.favorite_border, size: 32), - const SizedBox(height: 16), Text( strings.noFavoritesMessage, style: Theme.of(context).textTheme.titleLarge, textAlign: TextAlign.center, ), + const SizedBox(height: 16.0), + const Icon(Icons.favorite_border, size: 32.0), ], ), ); diff --git a/lib/widgets/internal/app_drawer.dart b/lib/widgets/internal/app_drawer.dart index 4cb7a5c..9949a10 100644 --- a/lib/widgets/internal/app_drawer.dart +++ b/lib/widgets/internal/app_drawer.dart @@ -137,11 +137,12 @@ class AppDrawer extends StatelessWidget { return Drawer( child: ListView( children: [ + // The app drawer header with a bottom margin _AppDrawerHeader(color: randomColor.color), + const SizedBox(height: 16.0), // The Set Color Wallpaper drawer item ListTile( - contentPadding: const EdgeInsets.all(16.0), leading: const Icon(Icons.wallpaper_rounded), title: const Text(strings.setWallpaperDrawer), subtitle: const Text(strings.setWallpaperDrawerSubtitle), From 098e3f340709abb0305ccb47f41a240f54779998 Mon Sep 17 00:00:00 2001 From: appgramming Date: Thu, 27 Jul 2023 16:29:42 +0300 Subject: [PATCH 2/3] Add custom list off icon on Color Info screen --- assets/fonts/CustomIcons.ttf | Bin 0 -> 1848 bytes lib/common/custom_icons.dart | 18 ++++++++++++++++++ lib/screens/color_info_screen.dart | 5 +++-- pubspec.yaml | 4 ++++ 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 assets/fonts/CustomIcons.ttf create mode 100644 lib/common/custom_icons.dart diff --git a/assets/fonts/CustomIcons.ttf b/assets/fonts/CustomIcons.ttf new file mode 100644 index 0000000000000000000000000000000000000000..743be8b8c63195a77eb7a156f1105c0703c8e52f GIT binary patch literal 1848 zcmd^9&1)n@9DUV2`7l{m*r2@}B>|bE@{HkBQ-|PB) zbWKA57{}Z2QCh8Dc~*Y#_zgfjO}6%Ob*{W5*WTiKkL!(kC+Pk*^VMfu|4!>RFec=e5?U+MpmHr-X3mgmlXLFr%gKLZna{b-AGpKCLlY6gdA8L~U0 z+qX6!xcn!^bM1cru@{UmzaQQ9``!VUqww70W+xBRZb!q8@dAzp{A0{@3Ep!nFV=7} z4s?P?P#EwJViC8S0rzKd)(TcB$OsJo%ldusA%+==wJD<5W zb&(Y&@BjNaVH@zMYlH2T=@f_QC+ztq;t6|~Cu|Cs7&$%l-~w&(^rW+k=NF!wqD`Kk z%OSNj%{I1_cHYiTv zXBQt>A(iJM_)lMP*uw~3b=W8Wn!^R+y2C@niNnLhyAF@x3B2d#8#=BbDedj+I$edYM+8HTtsku-S`) zbbuLv8)2HYRU+q$r2%#|Ou{tKVZ(&Zwwq onAction(_AppBarActions.toggleInfo), ), diff --git a/pubspec.yaml b/pubspec.yaml index fb311cd..23df5a7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -95,3 +95,7 @@ flutter: # # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages + fonts: + - family: CustomIcons + fonts: + - asset: assets/fonts/CustomIcons.ttf \ No newline at end of file From 89873610be27feec65874fa8bef2ff4c3ded6c10 Mon Sep 17 00:00:00 2001 From: appgramming Date: Thu, 27 Jul 2023 17:31:51 +0300 Subject: [PATCH 3/3] Update version and build.gradle --- android/build.gradle | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 3cdaac9..f7eb7f6 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,12 +1,12 @@ buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.10' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' + classpath 'com.android.tools.build:gradle:7.3.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/pubspec.yaml b/pubspec.yaml index 23df5a7..a4e4e77 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 2.0.0+3 +version: 2.0.1+4 environment: sdk: '>=3.0.6 <4.0.0'