환경 초기화 및 벤더 리포지토리 스켈레톤 도입
This commit is contained in:
135
lib/core/routing/app_router.dart
Normal file
135
lib/core/routing/app_router.dart
Normal file
@@ -0,0 +1,135 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
import '../../features/approvals/history/presentation/pages/approval_history_page.dart';
|
||||
import '../../features/approvals/request/presentation/pages/approval_request_page.dart';
|
||||
import '../../features/approvals/step/presentation/pages/approval_step_page.dart';
|
||||
import '../../features/approvals/template/presentation/pages/approval_template_page.dart';
|
||||
import '../../features/dashboard/presentation/pages/dashboard_page.dart';
|
||||
import '../../features/inventory/inbound/presentation/pages/inbound_page.dart';
|
||||
import '../../features/inventory/outbound/presentation/pages/outbound_page.dart';
|
||||
import '../../features/inventory/rental/presentation/pages/rental_page.dart';
|
||||
import '../../features/login/presentation/pages/login_page.dart';
|
||||
import '../../features/masters/customer/presentation/pages/customer_page.dart';
|
||||
import '../../features/masters/group/presentation/pages/group_page.dart';
|
||||
import '../../features/masters/group_permission/presentation/pages/group_permission_page.dart';
|
||||
import '../../features/masters/menu/presentation/pages/menu_page.dart';
|
||||
import '../../features/masters/product/presentation/pages/product_page.dart';
|
||||
import '../../features/masters/user/presentation/pages/user_page.dart';
|
||||
import '../../features/masters/vendor/presentation/pages/vendor_page.dart';
|
||||
import '../../features/masters/warehouse/presentation/pages/warehouse_page.dart';
|
||||
import '../../features/reporting/presentation/pages/reporting_page.dart';
|
||||
import '../../features/util/postal_search/presentation/pages/postal_search_page.dart';
|
||||
import '../../widgets/app_shell.dart';
|
||||
import '../constants/app_sections.dart';
|
||||
|
||||
final _rootNavigatorKey = GlobalKey<NavigatorState>(debugLabel: 'root');
|
||||
|
||||
final appRouter = GoRouter(
|
||||
navigatorKey: _rootNavigatorKey,
|
||||
initialLocation: loginRoutePath,
|
||||
routes: [
|
||||
GoRoute(path: '/', redirect: (_, __) => loginRoutePath),
|
||||
GoRoute(
|
||||
path: loginRoutePath,
|
||||
name: 'login',
|
||||
builder: (context, state) => const LoginPage(),
|
||||
),
|
||||
ShellRoute(
|
||||
builder: (context, state, child) =>
|
||||
AppShell(currentLocation: state.uri.toString(), child: child),
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: dashboardRoutePath,
|
||||
name: 'dashboard',
|
||||
builder: (context, state) => const DashboardPage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/inventory/inbound',
|
||||
name: 'inventory-inbound',
|
||||
builder: (context, state) => const InboundPage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/inventory/outbound',
|
||||
name: 'inventory-outbound',
|
||||
builder: (context, state) => const OutboundPage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/inventory/rental',
|
||||
name: 'inventory-rental',
|
||||
builder: (context, state) => const RentalPage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/masters/vendors',
|
||||
name: 'masters-vendors',
|
||||
builder: (context, state) => const VendorPage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/masters/products',
|
||||
name: 'masters-products',
|
||||
builder: (context, state) => const ProductPage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/masters/warehouses',
|
||||
name: 'masters-warehouses',
|
||||
builder: (context, state) => const WarehousePage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/masters/customers',
|
||||
name: 'masters-customers',
|
||||
builder: (context, state) => const CustomerPage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/masters/users',
|
||||
name: 'masters-users',
|
||||
builder: (context, state) => const UserPage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/masters/groups',
|
||||
name: 'masters-groups',
|
||||
builder: (context, state) => const GroupPage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/masters/menus',
|
||||
name: 'masters-menus',
|
||||
builder: (context, state) => const MenuPage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/masters/group-permissions',
|
||||
name: 'masters-group-permissions',
|
||||
builder: (context, state) => const GroupPermissionPage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/approvals/requests',
|
||||
name: 'approvals-requests',
|
||||
builder: (context, state) => const ApprovalRequestPage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/approvals/steps',
|
||||
name: 'approvals-steps',
|
||||
builder: (context, state) => const ApprovalStepPage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/approvals/history',
|
||||
name: 'approvals-history',
|
||||
builder: (context, state) => const ApprovalHistoryPage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/approvals/templates',
|
||||
name: 'approvals-templates',
|
||||
builder: (context, state) => const ApprovalTemplatePage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/utilities/postal-search',
|
||||
name: 'utilities-postal-search',
|
||||
builder: (context, state) => const PostalSearchPage(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/reports',
|
||||
name: 'reports',
|
||||
builder: (context, state) => const ReportingPage(),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
Reference in New Issue
Block a user