Skip to content

Commit

Permalink
fix: use flutter_iconpicker_plus instead of flutter_iconpicker
Browse files Browse the repository at this point in the history
  • Loading branch information
harljo committed Apr 4, 2024
1 parent e764e75 commit 887cde7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 185 deletions.
2 changes: 1 addition & 1 deletion lib/group/group_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'dart:convert';
import 'dart:developer';

import 'package:flutter/material.dart';
import 'package:flutter_iconpicker/flutter_iconpicker.dart';
import 'package:flutter_iconpicker_plus/flutter_iconpicker.dart';
import 'package:flutter_triple/flutter_triple.dart';
import 'package:quacker/constants.dart';
import 'package:quacker/database/entities.dart';
Expand Down
15 changes: 12 additions & 3 deletions lib/subscriptions/_groups.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import 'dart:convert';
import 'package:dotted_border/dotted_border.dart';
import 'package:flutter/material.dart';
import 'package:flutter_colorpicker/flutter_colorpicker.dart';
import 'package:flutter_iconpicker/flutter_iconpicker.dart';
import 'package:flutter_iconpicker_plus/IconPicker/Packs/Material.dart';
import 'package:flutter_iconpicker_plus/flutter_iconpicker.dart';
import 'package:flutter_triple/flutter_triple.dart';
import 'package:quacker/constants.dart';
import 'package:quacker/database/entities.dart';
Expand Down Expand Up @@ -213,6 +214,13 @@ class _SubscriptionGroupEditDialogState extends State<SubscriptionGroupEditDialo
return const Center(child: CircularProgressIndicator());
}

// Filter the Material icons to only the ones the app uses
var iconPack = icons.entries.where((value) =>
!value.key.endsWith('_sharp') &&
!value.key.endsWith('_rounded') &&
!value.key.endsWith('_outlined') &&
!value.key.endsWith('_outline'));

List<Widget> buttonsLst1 = [
TextButton(
onPressed: () {
Expand Down Expand Up @@ -348,8 +356,9 @@ class _SubscriptionGroupEditDialogState extends State<SubscriptionGroupEditDialo
IconButton(
icon: Icon(deserializeIconData(icon)),
onPressed: () async {
var selectedIcon = await showIconPicker(context,
iconPackModes: [IconPack.material],
var selectedIcon = await FlutterIconPicker.showIconPicker(context,
iconPackModes: [IconPack.custom],
customIconPack: Map.fromEntries(iconPack),
title: Text(L10n.of(context).pick_an_icon),
closeChild: Text(L10n.of(context).close),
searchHintText: L10n.of(context).search,
Expand Down
184 changes: 4 additions & 180 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.7.5"
chunked_stream:
dependency: transitive
description:
name: chunked_stream
sha256: b2fde5f81d780f0c1699b8347cae2e413412ae947fc6e64727cc48c6bb54c95c
url: "https://pub.dev"
source: hosted
version: "1.4.2"
circular_buffer:
dependency: transitive
description:
name: circular_buffer
sha256: "2889afcfc97aa0d9a4930ae5fdf206aea7d0ac88a3649acec9130565cd8f45d8"
url: "https://pub.dev"
source: hosted
version: "0.11.0"
cli_util:
dependency: transitive
description:
Expand Down Expand Up @@ -169,14 +153,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.0"
csv:
dependency: transitive
description:
name: csv
sha256: "63ed2871dd6471193dffc52c0e6c76fb86269c00244d244297abbb355c84a86e"
url: "https://pub.dev"
source: hosted
version: "5.1.1"
cupertino_icons:
dependency: transitive
description:
Expand All @@ -185,14 +161,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.6"
dart_console2:
dependency: transitive
description:
name: dart_console2
sha256: "300833ffdd8c465d454cb5007c7f29d28ac8246af5abd922f8c490e1e87c894f"
url: "https://pub.dev"
source: hosted
version: "3.0.0"
dart_pubspec_licenses:
dependency: transitive
description:
Expand Down Expand Up @@ -225,22 +193,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.7.10"
dcli:
dependency: transitive
description:
name: dcli
sha256: eb797595afab6aec4ce7a98635dc2cfc0d79b2e8059c624be52052ed8f68ff7c
url: "https://pub.dev"
source: hosted
version: "3.4.0"
dcli_core:
dependency: transitive
description:
name: dcli_core
sha256: "5736e57897a2aa062afa05f8cda7a69c7473d65b2fa4e200576c25f357f4a5e8"
url: "https://pub.dev"
source: hosted
version: "3.4.0"
device_frame:
dependency: transitive
description:
Expand Down Expand Up @@ -289,14 +241,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.7.0"
equatable:
dependency: transitive
description:
name: equatable
sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2
url: "https://pub.dev"
source: hosted
version: "2.0.5"
extended_image:
dependency: "direct main"
description:
Expand Down Expand Up @@ -407,14 +351,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.2"
flutter_iconpicker:
flutter_iconpicker_plus:
dependency: "direct main"
description:
name: flutter_iconpicker
sha256: "84279d322f1542a97bf09b780a859eb766a0af64b7de1aae4b51377771916b88"
name: flutter_iconpicker_plus
sha256: "29f22d4efbb2e29e7a15b3e159857791b6b75600d80c43bcc780c81c8c776c98"
url: "https://pub.dev"
source: hosted
version: "3.4.4"
version: "3.2.3"
flutter_launcher_icons:
dependency: "direct dev"
description:
Expand Down Expand Up @@ -534,14 +478,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.4.1"
functional_data:
dependency: transitive
description:
name: functional_data
sha256: aefdec4365452283b2a7cf420a3169654d51d3e9553069a22d76680d7a9d7c3d
url: "https://pub.dev"
source: hosted
version: "1.1.1"
glob:
dependency: transitive
description:
Expand All @@ -550,14 +486,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.2"
globbing:
dependency: transitive
description:
name: globbing
sha256: "4f89cfaf6fa74c9c1740a96259da06bd45411ede56744e28017cc534a12b6e2d"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
html:
dependency: transitive
description:
Expand Down Expand Up @@ -622,14 +550,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.0.0"
ini:
dependency: transitive
description:
name: ini
sha256: "12a76c53591ffdf86d1265be3f986888a6dfeb34a85957774bc65912d989a173"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
intl:
dependency: "direct main"
description:
Expand All @@ -654,14 +574,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.6.7"
json2yaml:
dependency: transitive
description:
name: json2yaml
sha256: da94630fbc56079426fdd167ae58373286f603371075b69bf46d848d63ba3e51
url: "https://pub.dev"
source: hosted
version: "3.0.1"
json_annotation:
dependency: transitive
description:
Expand Down Expand Up @@ -702,14 +614,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.0"
lists:
dependency: transitive
description:
name: lists
sha256: "4ca5c19ae4350de036a7e996cdd1ee39c93ac0a2b840f4915459b7d0a7d4ab27"
url: "https://pub.dev"
source: hosted
version: "1.0.1"
logging:
dependency: "direct main"
description:
Expand Down Expand Up @@ -958,14 +862,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.7.4"
posix:
dependency: transitive
description:
name: posix
sha256: a0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a
url: "https://pub.dev"
source: hosted
version: "6.0.1"
pref:
dependency: "direct main"
description:
Expand All @@ -990,22 +886,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
pubspec_lock:
dependency: transitive
description:
name: pubspec_lock
sha256: ed5fc1ecd0cdc0e14475a091afcb2c4cbb00e74cebff17635e9abbec18d76cc4
url: "https://pub.dev"
source: hosted
version: "3.0.2"
pubspec_manager:
dependency: transitive
description:
name: pubspec_manager
sha256: b2674161f3f69ed07bc164dc4172afc190d56f060a293a8eb6fa691e5ddf9b5c
url: "https://pub.dev"
source: hosted
version: "1.0.0"
quiver:
dependency: "direct main"
description:
Expand All @@ -1014,14 +894,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.2.1"
scope:
dependency: transitive
description:
name: scope
sha256: "80cf1cb727791fdaaa4131817974a6084815ed59b9ab02ef352c3a1badea488b"
url: "https://pub.dev"
source: hosted
version: "4.1.0"
scroll_to_index:
dependency: "direct main"
description:
Expand All @@ -1038,14 +910,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.6.0"
settings_yaml:
dependency: transitive
description:
name: settings_yaml
sha256: c568c79a1a2e48235d7f6cb06a78b15867879cc1995796dd324b9bc125e6b077
url: "https://pub.dev"
source: hosted
version: "8.0.1"
share_plus:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1211,22 +1075,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.0"
strings:
dependency: transitive
description:
name: strings
sha256: b33f40c4dd3e597bf6d9e7f4f4dc282dad0f19b07d9f320cb5c2183859cbccf5
url: "https://pub.dev"
source: hosted
version: "3.1.1"
sum_types:
dependency: transitive
description:
name: sum_types
sha256: c0a0fad9a518d011987e1d9f27fc336194294e55dafdc3699363e52aa5776e09
url: "https://pub.dev"
source: hosted
version: "0.3.5"
synchronized:
dependency: transitive
description:
Expand All @@ -1235,14 +1083,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.1.0+1"
system_info2:
dependency: transitive
description:
name: system_info2
sha256: "65206bbef475217008b5827374767550a5420ce70a04d2d7e94d1d2253f3efc9"
url: "https://pub.dev"
source: hosted
version: "4.0.0"
term_glyph:
dependency: transitive
description:
Expand Down Expand Up @@ -1315,14 +1155,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.1.0+2"
unicode:
dependency: transitive
description:
name: unicode
sha256: "0f69e46593d65245774d4f17125c6084d2c20b4e473a983f6e21b7d7762218f1"
url: "https://pub.dev"
source: hosted
version: "0.3.1"
url_launcher:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1395,14 +1227,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.3.3"
validators2:
dependency: transitive
description:
name: validators2
sha256: "5c63054b2f47b6a3f39e0d0e3f5d38829db4545250144a34c9e1585466de4814"
url: "https://pub.dev"
source: hosted
version: "5.0.0"
vector_math:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ dependencies:
file_picker: ^8.0.0+1
flutter_colorpicker: ^1.0.3
flutter_file_dialog: ^3.0.1
flutter_iconpicker: ^3.4.4
flutter_iconpicker_plus: ^3.2.3
flutter_localized_locales: ^2.0.3
flutter_triple: ^3.0.0
flutter_windowmanager: ^0.2.0
Expand Down

0 comments on commit 887cde7

Please sign in to comment.