Skip to content

Commit

Permalink
swap flutter_colorpicker for flutter_material_color_picker
Browse files Browse the repository at this point in the history
  • Loading branch information
TheHCJ committed May 15, 2024
1 parent c92c198 commit 7573b85
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 20 deletions.
9 changes: 4 additions & 5 deletions lib/settings/_theme.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_colorpicker/flutter_colorpicker.dart';
import 'package:flutter_material_color_picker/flutter_material_color_picker.dart';
import 'package:intl/intl.dart';
import 'package:quacker/constants.dart';
import 'package:quacker/generated/l10n.dart';
Expand Down Expand Up @@ -100,12 +100,11 @@ class _createColorPickerDialogState extends State<_createColorPickerDialog> {
],
children: [
SingleChildScrollView(
child: MaterialPicker(
pickerColor: color,
onColorChanged: (value) => setState(() {
child: MaterialColorPicker(
selectedColor: color,
onColorChange: (value) => setState(() {
selectedColor = value;
}),
enableLabel: true,
),
)
],
Expand Down
10 changes: 4 additions & 6 deletions lib/subscriptions/_groups.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:convert';
import 'package:dynamic_color/dynamic_color.dart';
import 'package:flutter/material.dart';
import 'package:flutter_colorpicker/flutter_colorpicker.dart';
import 'package:flutter_material_color_picker/flutter_material_color_picker.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';
Expand Down Expand Up @@ -282,13 +282,11 @@ class _SubscriptionGroupEditDialogState extends State<SubscriptionGroupEditDialo
return AlertDialog(
title: Text(L10n.of(context).pick_a_color),
content: SingleChildScrollView(
child: MaterialPicker(
pickerColor:
color?.harmonizeWith(Theme.of(context).colorScheme.primary) ?? Colors.grey,
onColorChanged: (value) => setState(() {
child: MaterialColorPicker(
selectedColor: color ?? Colors.grey,
onColorChange: (value) => setState(() {
selectedColor = value;
}),
enableLabel: true,
),
),
actions: <Widget>[
Expand Down
16 changes: 8 additions & 8 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -311,14 +311,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.1.0"
flutter_colorpicker:
dependency: "direct main"
description:
name: flutter_colorpicker
sha256: "458a6ed8ea480eb16ff892aedb4b7092b2804affd7e046591fb03127e8d8ef8b"
url: "https://pub.dev"
source: hosted
version: "1.0.3"
flutter_file_dialog:
dependency: "direct main"
description:
Expand Down Expand Up @@ -388,6 +380,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.5"
flutter_material_color_picker:
dependency: "direct main"
description:
name: flutter_material_color_picker
sha256: ca1e7749d228c9155ea24bce98e647cdbffa350e6f334f6c001f841cd3d9c987
url: "https://pub.dev"
source: hosted
version: "1.2.0"
flutter_oss_licenses:
dependency: "direct dev"
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies:
ffcache: ^1.1.0
flutter_cache: ^0.1.0
file_picker: ^8.0.0+1
flutter_colorpicker: ^1.0.3
flutter_material_color_picker: ^1.2.0
flutter_file_dialog: ^3.0.1
flutter_iconpicker_plus: ^3.2.3
flutter_localized_locales: ^2.0.3
Expand Down

0 comments on commit 7573b85

Please sign in to comment.