Refactor navigation and remove unused navigator extensions across staff features

- Removed background color from CreateOrderView, OneTimeOrderView, and RapidOrderView.
- Updated navigation paths in OneTimeOrderView and other staff authentication pages to use new constants.
- Deleted unused navigator extensions for staff authentication, home, profile, and shifts.
- Refactored navigation in StaffMainModule to use new path constants.
- Cleaned up imports and adjusted navigation calls in various staff-related pages and widgets.
This commit is contained in:
Achintha Isuru
2026-02-04 18:22:39 -05:00
parent b5c3af580c
commit 3b11c49d90
41 changed files with 122 additions and 434 deletions

View File

@@ -1,10 +0,0 @@
import 'package:flutter_modular/flutter_modular.dart';
/// Extension on [IModularNavigator] to provide strongly-typed navigation
/// for the staff attire feature.
extension AttireNavigator on IModularNavigator {
/// Navigates back.
void popAttire() {
pop();
}
}

View File

@@ -1,6 +0,0 @@
import 'package:flutter_modular/flutter_modular.dart';
extension ExperienceNavigator on IModularNavigator {
// Add navigation methods here if the page navigates deeper.
// Currently ExperiencePage is a leaf, but might need to navigate back or to success screen.
}

View File

@@ -1,36 +0,0 @@
import 'package:flutter_modular/flutter_modular.dart';
/// Typed navigation extensions for the Staff Profile Info feature.
///
/// Provides type-safe navigation methods to avoid magic strings
/// throughout the codebase.
extension ProfileInfoNavigator on IModularNavigator {
/// Navigates to the Personal Info page.
///
/// This page allows staff members to edit their personal information
/// including phone, bio, languages, and preferred locations.
Future<void> pushPersonalInfo() {
return pushNamed('./personal-info');
}
/// Navigates to the Emergency Contact page.
///
/// TODO: Implement when emergency contact page is created.
Future<void> pushEmergencyContact() {
return pushNamed('/profile/onboarding/emergency-contact');
}
/// Navigates to the Experience page.
///
/// TODO: Implement when experience page is created.
Future<void> pushExperience() {
return pushNamed('/profile/onboarding/experience');
}
/// Navigates to the Attire page.
///
/// TODO: Implement when attire page is created.
Future<void> pushAttire() {
return pushNamed('/profile/onboarding/attire');
}
}

View File

@@ -1,36 +0,0 @@
import 'package:flutter_modular/flutter_modular.dart';
/// Typed navigation extensions for the Staff Profile Info feature.
///
/// Provides type-safe navigation methods to avoid magic strings
/// throughout the codebase.
extension ProfileInfoNavigator on IModularNavigator {
/// Navigates to the Personal Info page.
///
/// This page allows staff members to edit their personal information
/// including phone, bio, languages, and preferred locations.
Future<void> pushPersonalInfo() {
return pushNamed('./personal-info');
}
/// Navigates to the Emergency Contact page.
///
/// TODO: Implement when emergency contact page is created.
Future<void> pushEmergencyContact() {
return pushNamed('/profile/onboarding/emergency-contact');
}
/// Navigates to the Experience page.
///
/// TODO: Implement when experience page is created.
Future<void> pushExperience() {
return pushNamed('/profile/onboarding/experience');
}
/// Navigates to the Attire page.
///
/// TODO: Implement when attire page is created.
Future<void> pushAttire() {
return pushNamed('/profile/onboarding/attire');
}
}