some changes and fixes

This commit is contained in:
amirrezaghabeli
2025-09-06 13:18:12 +03:30
parent 2fbd8018c8
commit 5649634464
24 changed files with 691 additions and 815 deletions
+26 -57
View File
@@ -31,66 +31,35 @@ class DesktopHomePage extends StatelessWidget {
if (homeViewModel.tenderApprovalsStateResponse != null &&
homeViewModel.data != null &&
homeViewModel.feedbackStats != null) {
return Column(
children: [
DesktopNavigationWidget(
currentIndex: 0, // Home index
onTabChanged: (index) {
// Navigate to different screens based on index
switch (index) {
case 0:
// Already on home
break;
case 1:
// Navigate to tenders
Router.neglect(
context,
() => TendersRouteData().go(context),
);
break;
case 2:
// Navigate to profile
Router.neglect(
context,
() => ProfileRouteData().go(context),
);
break;
}
},
),
Expanded(
child: Center(
child: SizedBox(
width: 780,
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 55),
// SizedBox(width: 780, child: NotificationCard()),
SizedBox(height: 40.0),
_progressBarsRow(homeViewModel),
SizedBox(height: 32.0.h()),
Padding(
padding: EdgeInsets.symmetric(
horizontal: 15.0.w(),
),
child: _firstTenderCardsRow(
context,
homeViewModel,
),
),
SizedBox(height: 32.0.h()),
_yourTenderText(homeViewModel),
SizedBox(height: 8.0.h()),
_bottomListView(homeViewModel),
],
return SingleChildScrollView(
child: Column(
children: [
DesktopNavigationWidget(
currentIndex: 0, // Home index
),
SizedBox(
width: 780,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(height: 55),
// SizedBox(width: 780, child: NotificationCard()),
SizedBox(height: 40.0),
_progressBarsRow(homeViewModel),
SizedBox(height: 32.0.h()),
Padding(
padding: EdgeInsets.symmetric(horizontal: 15.0.w()),
child: _firstTenderCardsRow(context, homeViewModel),
),
),
SizedBox(height: 32.0.h()),
_yourTenderText(homeViewModel),
SizedBox(height: 8.0.h()),
_bottomListView(homeViewModel),
],
),
),
),
],
],
),
);
}
return const Center(
-19
View File
@@ -1,5 +1,4 @@
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:provider/provider.dart';
import 'package:tm_app/core/routes/app_routes.dart';
import 'package:tm_app/core/theme/colors.dart';
@@ -27,24 +26,6 @@ class TabletHomePage extends StatelessWidget {
drawer: TabletNavigationWidget(
currentIndex: 0, // Home is index 0
onTabChanged: (index) {
// Handle navigation to other tabs
switch (index) {
case 0:
// Already on home
break;
case 1:
// Navigate to tenders
context.pop();
Router.neglect(context, () => TendersRouteData().go(context));
break;
case 2:
// Navigate to profile
context.pop();
Router.neglect(context, () => ProfileRouteData().go(context));
break;
}
},
),
body: Consumer<HomeViewModel>(
builder: (context, homeViewModel, child) {