fix(staff): align worker home route paths
- Updated staff_main modulePath to /worker-home - Updated main.dart to mount staff_main at /worker-home - Fixes RouteNotFoundException when navigating from auth
This commit is contained in:
@@ -6,6 +6,7 @@ import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
import 'package:staff_authentication/staff_authentication.dart'
|
||||
as staff_authentication;
|
||||
import 'package:staff_main/staff_main.dart' as staff_main;
|
||||
import 'package:firebase_core/firebase_core.dart';
|
||||
|
||||
void main() async {
|
||||
@@ -24,13 +25,7 @@ class AppModule extends Module {
|
||||
// Set the initial route to the authentication module
|
||||
r.module("/", module: staff_authentication.StaffAuthenticationModule());
|
||||
|
||||
// Placeholder for home route (referenced in auth feature)
|
||||
r.child(
|
||||
"/worker-home",
|
||||
child: (_) => const Scaffold(
|
||||
body: Center(child: Text("Worker Home - To Be Implemented")),
|
||||
),
|
||||
);
|
||||
r.module('/worker-home', module: staff_main.StaffMainModule());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
abstract class StaffMainRoutes {
|
||||
static const String modulePath = '/staff-main';
|
||||
static const String modulePath = '/worker-home';
|
||||
|
||||
static const String shifts = '/shifts';
|
||||
static const String payments = '/payments';
|
||||
|
||||
Reference in New Issue
Block a user