This commit is contained in:
yifeng.yl
2019-01-08 20:39:13 +08:00
parent 383819e280
commit 2e9702ec7b
242 changed files with 13523 additions and 654 deletions

View File

@ -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);
},

View File

@ -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);
});