aaa
This commit is contained in:
23
lib/app.dart
23
lib/app.dart
@@ -2,8 +2,8 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import 'package:worker/core/router/app_router.dart';
|
||||
import 'package:worker/core/theme/app_theme.dart';
|
||||
import 'package:worker/features/home/presentation/pages/home_page.dart';
|
||||
import 'package:worker/generated/l10n/app_localizations.dart';
|
||||
|
||||
/// Root application widget for Worker Mobile App
|
||||
@@ -19,11 +19,15 @@ class WorkerApp extends ConsumerWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return MaterialApp(
|
||||
return MaterialApp.router(
|
||||
// ==================== App Configuration ====================
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: 'Worker App',
|
||||
|
||||
// ==================== Router Configuration ====================
|
||||
// Using go_router for declarative routing with deep linking support
|
||||
routerConfig: AppRouter.router,
|
||||
|
||||
// ==================== Theme Configuration ====================
|
||||
// Material 3 theme with brand colors (Primary Blue: #005B9A)
|
||||
theme: AppTheme.lightTheme(),
|
||||
@@ -64,21 +68,6 @@ class WorkerApp extends ConsumerWidget {
|
||||
return const Locale('vi', 'VN');
|
||||
},
|
||||
|
||||
// ==================== Navigation Configuration ====================
|
||||
// TODO: Replace with actual router configuration when navigation is implemented
|
||||
// Options:
|
||||
// 1. Use go_router for declarative routing
|
||||
// 2. Use Navigator 2.0 for imperative routing
|
||||
// 3. Use auto_route for type-safe routing
|
||||
//
|
||||
// For now, we show the home screen directly
|
||||
home: const HomePage(),
|
||||
|
||||
// Alternative: Use onGenerateRoute for custom routing
|
||||
// onGenerateRoute: (settings) {
|
||||
// return AppRouter.onGenerateRoute(settings);
|
||||
// },
|
||||
|
||||
// ==================== Material App Configuration ====================
|
||||
// Builder for additional context-dependent widgets
|
||||
builder: (context, child) {
|
||||
|
||||
Reference in New Issue
Block a user