Skip to content

Commit

Permalink
Merge pull request #3 from tecdrop/v2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
TechAurelian authored Jul 27, 2023
2 parents 39ced44 + 8987361 commit 45e0ba9
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 10 deletions.
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -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"
}
}
Expand Down
Binary file added assets/fonts/CustomIcons.ttf
Binary file not shown.
18 changes: 18 additions & 0 deletions lib/common/custom_icons.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright 2020-2023 Tecdrop (www.tecdrop.com)
// Use of this source code is governed by an MIT-style license that can be
// found in the LICENSE file.
//
// Flutter icons CustomIcons
// Copyright (C) 2023 by original authors @ fluttericon.com, fontello.com
// This font was generated by FlutterIcon.com, which is derived from Fontello.

/// Custom icons used in the app.
library;

import 'package:flutter/widgets.dart';

const _kFontFam = 'CustomIcons';
const String? _kFontPkg = null;

const IconData reorder_off_outlined =
IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg);
2 changes: 1 addition & 1 deletion lib/common/ui_strings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
9 changes: 6 additions & 3 deletions lib/screens/color_favorites_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ class _ColorFavoritesScreenState extends State<ColorFavoritesScreen> {
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
Expand Down Expand Up @@ -112,13 +115,13 @@ class _ColorFavoritesScreenState extends State<ColorFavoritesScreen> {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
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),
],
),
);
Expand Down
5 changes: 3 additions & 2 deletions lib/screens/color_info_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import '../../common/custom_icons.dart' as custom_icons;
import '../common/app_settings.dart' as settings;
import '../common/app_urls.dart' as urls;
import '../common/ui_strings.dart' as strings;
Expand Down Expand Up @@ -110,8 +111,8 @@ class _AppBar extends StatelessWidget implements PreferredSizeWidget {
// The toggle color information action button
IconButton(
icon: settings.showColorInformation
? const Icon(Icons.visibility_off_outlined)
: const Icon(Icons.visibility_outlined),
? const Icon(custom_icons.reorder_off_outlined)
: const Icon(Icons.reorder_outlined),
tooltip: strings.toggleColorInformation,
onPressed: () => onAction(_AppBarActions.toggleInfo),
),
Expand Down
3 changes: 2 additions & 1 deletion lib/widgets/internal/app_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,12 @@ class AppDrawer extends StatelessWidget {
return Drawer(
child: ListView(
children: <Widget>[
// 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),
Expand Down
6 changes: 5 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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

0 comments on commit 45e0ba9

Please sign in to comment.