路由這塊還是需要考慮下的,用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.