找不到路由RouteSettings的生成器

时间:2019-12-30 12:20:16

标签: flutter

我以前有一个项目。然后我重新制作了新的flutter项目。

当我构建项目并启动android模拟器时,我不知道为什么相同的路由设置RouteSettings(“ / page01”,null)仍然保留在新项目中。我删除了所有项目目录,然后重新启动了所有

我想清理项目。

I/flutter (18749): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter (19209): ══╡ EXCEPTION CAUGHT BY GESTURE ╞═══════════════════════════════════════════════════════════════════
I/flutter (19209): The following assertion was thrown while handling a gesture:
I/flutter (19209): Could not find a generator for route RouteSettings("/page01", null) in the _WidgetsAppState.
I/flutter (19209): Generators for routes are searched for in the following order:
I/flutter (19209):  1. For the "/" route, the "home" property, if non-null, is used.
I/flutter (19209):  2. Otherwise, the "routes" table is used, if it has an entry for the route.
I/flutter (19209):  3. Otherwise, onGenerateRoute is called. It should return a non-null value for any valid route not
I/flutter (19209): handled by "home" and "routes".
I/flutter (19209):  4. Finally if all else fails onUnknownRoute is called.
I/flutter (19209): Unfortunately, onUnknownRoute was not set.

请给我一个建议。

0 个答案:

没有答案