Skip to content

Commit 45e0ba9

Browse files
authored
Merge pull request #3 from tecdrop/v2.0.1
2 parents 39ced44 + 8987361 commit 45e0ba9

File tree

8 files changed

+37
-10
lines changed

8 files changed

+37
-10
lines changed

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
buildscript {
2-
ext.kotlin_version = '1.6.10'
2+
ext.kotlin_version = '1.7.10'
33
repositories {
44
google()
55
mavenCentral()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.1.2'
9+
classpath 'com.android.tools.build:gradle:7.3.0'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}

assets/fonts/CustomIcons.ttf

1.8 KB
Binary file not shown.

lib/common/custom_icons.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright 2020-2023 Tecdrop (www.tecdrop.com)
2+
// Use of this source code is governed by an MIT-style license that can be
3+
// found in the LICENSE file.
4+
//
5+
// Flutter icons CustomIcons
6+
// Copyright (C) 2023 by original authors @ fluttericon.com, fontello.com
7+
// This font was generated by FlutterIcon.com, which is derived from Fontello.
8+
9+
/// Custom icons used in the app.
10+
library;
11+
12+
import 'package:flutter/widgets.dart';
13+
14+
const _kFontFam = 'CustomIcons';
15+
const String? _kFontPkg = null;
16+
17+
const IconData reorder_off_outlined =
18+
IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);

lib/common/ui_strings.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const String goHome = 'Go Home';
9292
// -----------------------------------------------------------------------------------------------
9393

9494
const String favoriteColorsScreenTitle = 'Favorite Colors';
95-
const String noFavoritesMessage = 'No favorite colors yet';
95+
const String noFavoritesMessage = 'No favorite colors yet\n\nGo back home and start tapping on';
9696
const String removedFromFavorites = 'Removed from favorites';
9797
const String undoRemoveFromFavorites = 'Undo';
9898
const String clearFavorites = 'Clear favorites';

lib/screens/color_favorites_screen.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ class _ColorFavoritesScreenState extends State<ColorFavoritesScreen> {
6767
onPressed: () => setState(() => settings.colorFavoritesList.insert(index, randomColor)),
6868
),
6969
);
70-
ScaffoldMessenger.of(context).showSnackBar(snackBar);
70+
ScaffoldMessenger.of(context)
71+
// The user may delete multiple colors in a row, so remove any existing snackbar before
72+
..removeCurrentSnackBar()
73+
..showSnackBar(snackBar);
7174
}
7275

7376
@override
@@ -112,13 +115,13 @@ class _ColorFavoritesScreenState extends State<ColorFavoritesScreen> {
112115
child: Column(
113116
mainAxisAlignment: MainAxisAlignment.center,
114117
children: <Widget>[
115-
const Icon(Icons.favorite_border, size: 32),
116-
const SizedBox(height: 16),
117118
Text(
118119
strings.noFavoritesMessage,
119120
style: Theme.of(context).textTheme.titleLarge,
120121
textAlign: TextAlign.center,
121122
),
123+
const SizedBox(height: 16.0),
124+
const Icon(Icons.favorite_border, size: 32.0),
122125
],
123126
),
124127
);

lib/screens/color_info_screen.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import 'package:flutter/material.dart';
66
import 'package:flutter/services.dart';
77

8+
import '../../common/custom_icons.dart' as custom_icons;
89
import '../common/app_settings.dart' as settings;
910
import '../common/app_urls.dart' as urls;
1011
import '../common/ui_strings.dart' as strings;
@@ -110,8 +111,8 @@ class _AppBar extends StatelessWidget implements PreferredSizeWidget {
110111
// The toggle color information action button
111112
IconButton(
112113
icon: settings.showColorInformation
113-
? const Icon(Icons.visibility_off_outlined)
114-
: const Icon(Icons.visibility_outlined),
114+
? const Icon(custom_icons.reorder_off_outlined)
115+
: const Icon(Icons.reorder_outlined),
115116
tooltip: strings.toggleColorInformation,
116117
onPressed: () => onAction(_AppBarActions.toggleInfo),
117118
),

lib/widgets/internal/app_drawer.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,12 @@ class AppDrawer extends StatelessWidget {
137137
return Drawer(
138138
child: ListView(
139139
children: <Widget>[
140+
// The app drawer header with a bottom margin
140141
_AppDrawerHeader(color: randomColor.color),
142+
const SizedBox(height: 16.0),
141143

142144
// The Set Color Wallpaper drawer item
143145
ListTile(
144-
contentPadding: const EdgeInsets.all(16.0),
145146
leading: const Icon(Icons.wallpaper_rounded),
146147
title: const Text(strings.setWallpaperDrawer),
147148
subtitle: const Text(strings.setWallpaperDrawerSubtitle),

pubspec.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
1717
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
1818
# In Windows, build-name is used as the major, minor, and patch parts
1919
# of the product and file versions while build-number is used as the build suffix.
20-
version: 2.0.0+3
20+
version: 2.0.1+4
2121

2222
environment:
2323
sdk: '>=3.0.6 <4.0.0'
@@ -95,3 +95,7 @@ flutter:
9595
#
9696
# For details regarding fonts from package dependencies,
9797
# see https://flutter.dev/custom-fonts/#from-packages
98+
fonts:
99+
- family: CustomIcons
100+
fonts:
101+
- asset: assets/fonts/CustomIcons.ttf

0 commit comments

Comments
 (0)