Skip to content

Commit

Permalink
Color picker tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ferraridamiano committed May 11, 2024
1 parent aa9db88 commit 9465fb9
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Generated file.
//
// If you wish to remove Flutter's multidex support, delete this entire file.
//
// Modifications to this file should be done in a copy under a different name
// as this file may be regenerated.

package io.flutter.app;

import android.app.Application;
import android.content.Context;
import androidx.annotation.CallSuper;
import androidx.multidex.MultiDex;

/**
* Extension of {@link android.app.Application}, adding multidex support.
*/
public class FlutterMultiDexApplication extends Application {
@Override
@CallSuper
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
}
14 changes: 8 additions & 6 deletions lib/pages/settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -492,12 +492,14 @@ class ColorPickerDialog extends ConsumerWidget {
style: Theme.of(context).textTheme.titleMedium,
),
const SizedBox(height: 4),
Palette(
initial: themeColor.colorTheme,
enabled: !themeColor.useDeviceColor,
onSelected: (color) => ref
.read(ThemeColorNotifier.provider.notifier)
.setColorTheme(color),
Center(
child: Palette(
initial: themeColor.colorTheme,
enabled: !themeColor.useDeviceColor,
onSelected: (color) => ref
.read(ThemeColorNotifier.provider.notifier)
.setColorTheme(color),
),
)
],
),
Expand Down
8 changes: 4 additions & 4 deletions lib/utils/palette.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class _PaletteState extends State<Palette> {
Color? hoveredColor;
late Color selectedColor;

static const double squareSize = 45;
static const double checkSize = 25;
static const double squareSize = 43;
static const double checkSize = 24;

@override
void initState() {
Expand All @@ -31,8 +31,8 @@ class _PaletteState extends State<Palette> {
@override
Widget build(BuildContext context) {
final palette = Wrap(
spacing: 5,
runSpacing: 5,
spacing: 4,
runSpacing: 4,
children: [
Colors.red,
Colors.pink,
Expand Down

0 comments on commit 9465fb9

Please sign in to comment.