mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-08-06 09:01:00 +08:00
add file
This commit is contained in:
@ -5,9 +5,7 @@ import '../widgets/404.dart';
|
||||
|
||||
var categoryHandler = new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
print("params $params");
|
||||
String name = params["type"]?.first;
|
||||
print("type::: $name");
|
||||
|
||||
return new CategoryHome(name);
|
||||
},
|
||||
|
@ -13,7 +13,6 @@ class Routes {
|
||||
List widgetDemosList = new WidgetDemoList().getDemos();
|
||||
router.notFoundHandler = new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
print("ROUTE WAS NOT FOUND !!!");
|
||||
});
|
||||
|
||||
|
||||
@ -22,11 +21,9 @@ class Routes {
|
||||
widgetDemosList.forEach((demo) {
|
||||
Handler handler = new Handler(
|
||||
handlerFunc: (BuildContext context, Map<String, List<String>> params) {
|
||||
print('detail路由:${demo.buildRouter(context)}');
|
||||
return demo.buildRouter(context);
|
||||
});
|
||||
|
||||
print('路由:${demo.routerName}');
|
||||
|
||||
router.define('${demo.routerName}', handler: handler);
|
||||
});
|
||||
|
Reference in New Issue
Block a user