This commit is contained in:
toly
2023-12-10 15:25:12 +08:00
parent 2ceed8b9b5
commit 7b16b52761
86 changed files with 3635 additions and 930 deletions

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import '../../provider/state.dart';
import 'color_picker.dart';
class SortSettings extends StatefulWidget {
@@ -66,8 +67,9 @@ class _SortSettingsState extends State<SortSettings> {
child: IconButton(
splashRadius: 20,
onPressed: (){
SortState state = SortStateScope.of(context);
state.config =state.config.copyWith(
SortState state = SortStateScope.read(context);
state.config = state.config.copyWith(
count: int.parse(_count.text),
duration: Duration(
microseconds: int.parse(_duration.text),
@@ -75,7 +77,8 @@ class _SortSettingsState extends State<SortSettings> {
seed: int.parse(_seed.text),
colorIndex: _colorIndex
);
Navigator.of(context).pop();
GoRouter.of(context).pop();
// Navigator.of(context).pop();
}, icon: Icon(Icons.check)),
)],
iconTheme: IconThemeData(color: Colors.black),