Files
AIOA/mobile/lib/app/router.dart
T
2026-07-18 09:13:27 +08:00

32 lines
1.2 KiB
Dart

import 'package:aioa_mobile/app/shell.dart';
import 'package:aioa_mobile/features/assistant/presentation/assistant_page.dart';
import 'package:aioa_mobile/features/form/presentation/leave_form_page.dart';
import 'package:aioa_mobile/features/profile/presentation/profile_page.dart';
import 'package:aioa_mobile/features/tasks/presentation/tasks_page.dart';
import 'package:aioa_mobile/features/workspace/presentation/workspace_page.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
final appRouter = GoRouter(
initialLocation: '/workspace',
routes: [
ShellRoute(
builder: (context, state, child) =>
AioaShell(location: state.uri.path, child: child),
routes: [
GoRoute(path: '/workspace', builder: (_, _) => const WorkspacePage()),
GoRoute(path: '/assistant', builder: (_, _) => const AssistantPage()),
GoRoute(path: '/tasks', builder: (_, _) => const TasksPage()),
GoRoute(path: '/profile', builder: (_, _) => const ProfilePage()),
],
),
GoRoute(
path: '/leave/new',
pageBuilder: (context, state) => MaterialPage<void>(
fullscreenDialog: true,
child: const LeaveFormPage(),
),
),
],
);