最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

flutter - Is this a valid routes config in go_router? - Stack Overflow

programmeradmin0浏览0评论

This is actually a short version of this question (at least these questions are related in meaning).

Is the following routes structure valid? (hint: these are nested ‘routes’ sections)

final _router = GoRouter(
  initialLocation: '/',
  routes: [
    GoRoute(
      path: '/',
      builder: (context, state) => const HomeView(),
      routes: [
        ...
        GoRoute(
          path: 'rapports',
          builder: (context, state) {
            return const RapportListViewMod();
          },
          routes: [
            GoRoute(
                path: '/groupWithExtraParam',
                builder: (context, state) {
                    ...
                },
            ),
          ],
        ),
        ...
      ],
    ),
    ...
  ]
);
发布评论

评论列表(0)

  1. 暂无评论