M3 Overhaul

This commit is contained in:
2026-03-06 20:03:32 +08:00
parent 82fe619f22
commit 73dc735cce
32 changed files with 1940 additions and 682 deletions
+74 -24
View File
@@ -24,6 +24,7 @@ import '../screens/tickets/tickets_list_screen.dart';
import '../screens/workforce/workforce_screen.dart';
import '../widgets/app_shell.dart';
import '../screens/teams/teams_screen.dart';
import '../theme/m3_motion.dart';
final appRouterProvider = Provider<GoRouter>((ref) {
final notifier = RouterNotifier(ref);
@@ -79,82 +80,131 @@ final appRouterProvider = Provider<GoRouter>((ref) {
routes: [
GoRoute(
path: '/settings/teams',
builder: (context, state) => const TeamsScreen(),
pageBuilder: (context, state) => M3SharedAxisPage(
key: state.pageKey,
child: const TeamsScreen(),
),
),
GoRoute(
path: '/dashboard',
builder: (context, state) => const DashboardScreen(),
pageBuilder: (context, state) => M3SharedAxisPage(
key: state.pageKey,
child: const DashboardScreen(),
),
),
GoRoute(
path: '/tickets',
builder: (context, state) => const TicketsListScreen(),
pageBuilder: (context, state) => M3SharedAxisPage(
key: state.pageKey,
child: const TicketsListScreen(),
),
routes: [
GoRoute(
path: ':id',
builder: (context, state) => TicketDetailScreen(
ticketId: state.pathParameters['id'] ?? '',
pageBuilder: (context, state) => M3ContainerTransformPage(
key: state.pageKey,
child: TicketDetailScreen(
ticketId: state.pathParameters['id'] ?? '',
),
),
),
],
),
GoRoute(
path: '/tasks',
builder: (context, state) => const TasksListScreen(),
pageBuilder: (context, state) => M3SharedAxisPage(
key: state.pageKey,
child: const TasksListScreen(),
),
routes: [
GoRoute(
path: ':id',
builder: (context, state) =>
TaskDetailScreen(taskId: state.pathParameters['id'] ?? ''),
pageBuilder: (context, state) => M3ContainerTransformPage(
key: state.pageKey,
child: TaskDetailScreen(
taskId: state.pathParameters['id'] ?? '',
),
),
),
],
),
GoRoute(
path: '/events',
builder: (context, state) => const UnderDevelopmentScreen(
title: 'Events',
subtitle: 'Event monitoring is under development.',
icon: Icons.event,
pageBuilder: (context, state) => M3SharedAxisPage(
key: state.pageKey,
child: const UnderDevelopmentScreen(
title: 'Events',
subtitle: 'Event monitoring is under development.',
icon: Icons.event,
),
),
),
GoRoute(
path: '/announcements',
builder: (context, state) => const UnderDevelopmentScreen(
title: 'Announcement',
subtitle: 'Operational broadcasts are coming soon.',
icon: Icons.campaign,
pageBuilder: (context, state) => M3SharedAxisPage(
key: state.pageKey,
child: const UnderDevelopmentScreen(
title: 'Announcement',
subtitle: 'Operational broadcasts are coming soon.',
icon: Icons.campaign,
),
),
),
GoRoute(
path: '/workforce',
builder: (context, state) => const WorkforceScreen(),
pageBuilder: (context, state) => M3SharedAxisPage(
key: state.pageKey,
child: const WorkforceScreen(),
),
),
GoRoute(
path: '/reports',
builder: (context, state) => const ReportsScreen(),
pageBuilder: (context, state) => M3SharedAxisPage(
key: state.pageKey,
child: const ReportsScreen(),
),
),
GoRoute(
path: '/settings/users',
builder: (context, state) => const UserManagementScreen(),
pageBuilder: (context, state) => M3SharedAxisPage(
key: state.pageKey,
child: const UserManagementScreen(),
),
),
GoRoute(
path: '/settings/offices',
builder: (context, state) => const OfficesScreen(),
pageBuilder: (context, state) => M3SharedAxisPage(
key: state.pageKey,
child: const OfficesScreen(),
),
),
GoRoute(
path: '/settings/geofence-test',
builder: (context, state) => const GeofenceTestScreen(),
pageBuilder: (context, state) => M3SharedAxisPage(
key: state.pageKey,
child: const GeofenceTestScreen(),
),
),
GoRoute(
path: '/settings/permissions',
builder: (context, state) => const PermissionsScreen(),
pageBuilder: (context, state) => M3SharedAxisPage(
key: state.pageKey,
child: const PermissionsScreen(),
),
),
GoRoute(
path: '/notifications',
builder: (context, state) => const NotificationsScreen(),
pageBuilder: (context, state) => M3SharedAxisPage(
key: state.pageKey,
child: const NotificationsScreen(),
),
),
GoRoute(
path: '/profile',
builder: (context, state) => const ProfileScreen(),
pageBuilder: (context, state) => M3SharedAxisPage(
key: state.pageKey,
child: const ProfileScreen(),
),
),
],
),