关于 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.

原文地址:https://www.cnblogs.com/nightfallsad/p/11692216.html