mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-05-20 06:16:20 +08:00
update: router path
This commit is contained in:
@ -443,11 +443,12 @@ class _History extends State<History> {
|
||||
if (WidgetName2Icon.icons[value.name] != null) {
|
||||
icon = Icon(WidgetName2Icon.icons[value.name], size: 25);
|
||||
}
|
||||
String targetRouter = value.targetRouter;
|
||||
|
||||
list.add(
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Application.router.navigateTo(context, "${value.targetRouter}", transition: TransitionType.inFromRight);
|
||||
Application.router.navigateTo(context, "${targetRouter.toLowerCase()}", transition: TransitionType.inFromRight);
|
||||
},
|
||||
child: Chip(
|
||||
avatar: icon,
|
||||
|
@ -35,6 +35,7 @@ class WidgetItemContainer extends StatelessWidget {
|
||||
widgetDemosList.forEach((item) {
|
||||
if (item.name == targetName) {
|
||||
targetRouter = item.routerName;
|
||||
targetRouter = targetRouter.toLowerCase();
|
||||
}
|
||||
});
|
||||
Application.router.navigateTo(context, targetRouter, transition: TransitionType.inFromRight);
|
||||
|
@ -41,7 +41,8 @@ class Routes {
|
||||
name: 'component', parameters: {'name': demo.routerName });
|
||||
return demo.buildRouter(context);
|
||||
});
|
||||
router.define('${demo.routerName}', handler: handler);
|
||||
String path = demo.routerName;
|
||||
router.define('${path.toLowerCase()}', handler: handler);
|
||||
});
|
||||
router.define(standardPage,handler:standardPageHandler);
|
||||
// router.define(webViewPage,handler:webViewPageHand);
|
||||
|
@ -93,7 +93,8 @@ class _MyHomePageState extends State<AppPage>
|
||||
searchHistoryList.add(
|
||||
SearchHistory(name: targetName, targetRouter: widgetPoint.routerName));
|
||||
print("searchHistoryList1 ${searchHistoryList.toString()}");
|
||||
Application.router.navigateTo(context, widgetPoint.routerName,
|
||||
String targetRouter = widgetPoint.routerName;
|
||||
Application.router.navigateTo(context, targetRouter.toLowerCase(),
|
||||
transition: TransitionType.inFromRight);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user