Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GoRoute(
- path: AppRoutes.issues.toPath,
- name: AppRoutes.issues.toName,
- builder: (_, __) => const IssuesView(),
- routes: [
- // issue details
- StatefulShellRoute.indexedStack(
- branches: [
- StatefulShellBranch(
- routes: [
- GoRoute(
- path: 'details',
- redirect: (_, state) => state.namedLocation(
- 'ISSUE_DETAILS',
- pathParameters: state.pathParameters,
- queryParameters: state.uri.queryParameters,
- ),
- ),
- GoRoute(
- path: ':issueId/details',
- name: 'ISSUE_DETAILS',
- pageBuilder: (_, state) {
- return const NoTransitionPage(
- child: IssueDetailsView(),
- );
- },
- ),
- ],
- ),
- StatefulShellBranch(
- routes: [
- GoRoute(
- path: 'logs',
- redirect: (_, state) => state.namedLocation(
- 'ISSUE_DETAILS_LOGS',
- pathParameters: state.pathParameters,
- queryParameters: state.uri.queryParameters,
- ),
- ),
- GoRoute(
- path: ':issueId/logs',
- name: 'ISSUE_DETAILS_LOGS',
- pageBuilder: (_, state) {
- return const NoTransitionPage(
- child: IssueLogsView(),
- );
- },
- ),
- ],
- ),
- StatefulShellBranch(
- routes: [
- GoRoute(
- path: 'checklist',
- redirect: (_, state) => state.namedLocation(
- 'ISSUE_DETAILS_CHECKLIST',
- pathParameters: state.pathParameters,
- queryParameters: state.uri.queryParameters,
- ),
- ),
- GoRoute(
- path: 'checklist',
- name: 'ISSUE_DETAILS_CHECKLIST',
- pageBuilder: (_, state) {
- return const NoTransitionPage(
- child: IssueCheckListView(),
- );
- },
- ),
- ],
- ),
- StatefulShellBranch(
- routes: [
- GoRoute(
- path: 'chat',
- redirect: (_, state) => state.namedLocation(
- 'ISSUE_DETAILS_CHAT',
- pathParameters: state.pathParameters,
- queryParameters: state.uri.queryParameters,
- ),
- ),
- GoRoute(
- path: 'chat',
- name: 'ISSUE_DETAILS_CHAT',
- pageBuilder: (_, state) {
- return const NoTransitionPage(
- child: ChatView(),
- );
- },
- ),
- ],
- ),
- ],
- builder: (_, state, navigationShell) {
- // argument parsing
- return IssuePage(
- issueId: issueId,
- navigationShell: navigationShell,
- );
- },
- ),
- ],
- ),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement