关于 flutter Could not find a generator for route RouteSettings

路由这块还是需要考虑下的,用popAndPushNamed传参的时候用了onGenerateRoute

信息也给出了route search层级,我是因为在onGenerateRoute里没做拦截,直接return null了

Generators for routes are searched for in the following order:
1. For the "/" route, the "home" property, if non-null, is used.
2. Otherwise, the "routes" table is used, if it has an entry for the route.
3. Otherwise, onGenerateRoute is called. It should return a non-null value for any valid route not handled by "home" and "routes".
4. Finally if all else fails onUnknownRoute is called.

posted @ 2019-10-17 15:14  nightfallsad  阅读(3502)  评论(0编辑  收藏  举报