some changes and fixes
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user