This commit is contained in:
toly
2023-10-23 20:01:59 +08:00
parent e26099ac18
commit 8a95ed4417
13 changed files with 139 additions and 112 deletions

View File

@@ -36,15 +36,15 @@ class _ColorPageState extends State<ColorPage> {
}
void _selectColor(Color color){
// String value = color.value.toRadixString(16);
// router.path = '/color/detail?color=$value';
router.setPathForData('/color/detail',color);
String value = color.value.toRadixString(16);
router.path = '/color/detail?color=$value';
// router.setPathForData('/color/detail',color);
// router.setPathKeepLive('/color/detail?color=$value');
}
void _toAddPage() async {
Color? color = await router.changePathForResult('/color/add');
Color? color = await router.changePath('/color/add',forResult: true);
if (color != null) {
setState(() {
_colors.add(color);

View File

@@ -6,9 +6,9 @@ class EmptyPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('界面走丢了'),
),
// appBar: AppBar(
// title: Text('界面走丢了'),
// ),
body: Scaffold(
body: Center(
child: Wrap(