Refactor navigation structure and update asset references

- Swapped routes for Profile and Notification branches in the app's navigation structure.
- Updated the current index for navigation items in TabletNavigationWidget and related pages to reflect the new routing.
- Added a new logo SVG asset to the asset manager for branding consistency.
- Adjusted the pubspec.lock file to downgrade several package versions for compatibility.
This commit is contained in:
amirrezaghabeli
2025-11-22 15:29:46 +03:30
parent d01e028dc1
commit ae8501dc36
8 changed files with 71 additions and 66 deletions
+6 -5
View File
@@ -113,16 +113,17 @@ class SplashScreenRoute extends GoRouteData with _$SplashScreenRoute {
TypedGoRoute<TendersRouteData>(path: '/tenders'),
],
),
TypedStatefulShellBranch<ProfileBranch>(
routes: <TypedRoute<RouteData>>[
TypedGoRoute<ProfileRouteData>(path: '/profile'),
],
),
TypedStatefulShellBranch<NotificationBranch>(
routes: <TypedRoute<RouteData>>[
TypedGoRoute<NotificationRouteData>(path: '/notification'),
],
),
TypedStatefulShellBranch<ProfileBranch>(
routes: <TypedRoute<RouteData>>[
TypedGoRoute<ProfileRouteData>(path: '/profile'),
],
),
],
)
class AppShellRouteData extends StatefulShellRouteData {
+19 -19
View File
@@ -127,17 +127,6 @@ RouteBase get $appShellRouteData => StatefulShellRouteData.$route(
),
],
),
StatefulShellBranchData.$branch(
navigatorKey: ProfileBranch.$navigatorKey,
routes: [
GoRouteData.$route(
path: '/profile',
factory: _$ProfileRouteData._fromState,
),
],
),
StatefulShellBranchData.$branch(
navigatorKey: NotificationBranch.$navigatorKey,
@@ -149,6 +138,17 @@ RouteBase get $appShellRouteData => StatefulShellRouteData.$route(
),
],
),
StatefulShellBranchData.$branch(
navigatorKey: ProfileBranch.$navigatorKey,
routes: [
GoRouteData.$route(
path: '/profile',
factory: _$ProfileRouteData._fromState,
),
],
),
],
);
@@ -198,12 +198,12 @@ mixin _$TendersRouteData on GoRouteData {
void replace(BuildContext context) => context.replace(location);
}
mixin _$ProfileRouteData on GoRouteData {
static ProfileRouteData _fromState(GoRouterState state) =>
const ProfileRouteData();
mixin _$NotificationRouteData on GoRouteData {
static NotificationRouteData _fromState(GoRouterState state) =>
const NotificationRouteData();
@override
String get location => GoRouteData.$location('/profile');
String get location => GoRouteData.$location('/notification');
@override
void go(BuildContext context) => context.go(location);
@@ -219,12 +219,12 @@ mixin _$ProfileRouteData on GoRouteData {
void replace(BuildContext context) => context.replace(location);
}
mixin _$NotificationRouteData on GoRouteData {
static NotificationRouteData _fromState(GoRouterState state) =>
const NotificationRouteData();
mixin _$ProfileRouteData on GoRouteData {
static ProfileRouteData _fromState(GoRouterState state) =>
const ProfileRouteData();
@override
String get location => GoRouteData.$location('/notification');
String get location => GoRouteData.$location('/profile');
@override
void go(BuildContext context) => context.go(location);
@@ -50,19 +50,19 @@ class MobileShellPage extends StatelessWidget {
iconPath: AssetsManager.tenders,
activeIconPath: AssetsManager.tendersActive,
),
_bottomNavigationItem(
context: context,
text: TendersStrings.contracts,
isActive: navigationShell.currentIndex == 4,
onTap: () => onTap(4),
iconPath: AssetsManager.contracts,
activeIconPath: AssetsManager.contracts,
),
// _bottomNavigationItem(
// context: context,
// text: TendersStrings.contracts,
// isActive: navigationShell.currentIndex == 4,
// onTap: () => onTap(4),
// iconPath: AssetsManager.contracts,
// activeIconPath: AssetsManager.contracts,
// ),
_bottomNavigationItem(
context: context,
text: TendersStrings.notifications,
isActive: navigationShell.currentIndex == 3,
onTap: () => onTap(3),
isActive: navigationShell.currentIndex == 2,
onTap: () => onTap(2),
iconPath: AssetsManager.notify,
activeIconPath: AssetsManager.notifyActive,
showBadge:
@@ -73,8 +73,8 @@ class MobileShellPage extends StatelessWidget {
_bottomNavigationItem(
context: context,
text: ProfileStrings.profileTitle,
isActive: navigationShell.currentIndex == 2,
onTap: () => onTap(2),
isActive: navigationShell.currentIndex == 3,
onTap: () => onTap(3),
iconPath: AssetsManager.profile,
activeIconPath: AssetsManager.profileActive,
),