fix web bug and navigations
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:tm_app/core/constants/strings.dart';
|
||||
import 'package:tm_app/core/theme/colors.dart';
|
||||
@@ -9,6 +11,9 @@ import 'package:tm_app/views/your_tenders/widgets/approved_tenders.dart';
|
||||
import 'package:tm_app/views/your_tenders/widgets/tablet_desktop_appbar.dart';
|
||||
import 'package:tm_app/views/your_tenders/widgets/tenders_submitted.dart';
|
||||
|
||||
import '../../../core/constants/assets.dart';
|
||||
import '../../shared/tablet_navigation_widget.dart';
|
||||
|
||||
class YourTendersTabletPage extends StatefulWidget {
|
||||
const YourTendersTabletPage({super.key});
|
||||
|
||||
@@ -38,15 +43,59 @@ class _YourTendersTabletPageState extends State<YourTendersTabletPage>
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final GlobalKey<ScaffoldState> key = GlobalKey();
|
||||
return Scaffold(
|
||||
key: key,
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
|
||||
appBar: PreferredSize(
|
||||
preferredSize: const Size.fromHeight(64),
|
||||
child: AppBar(
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
elevation: 0,
|
||||
titleSpacing: 0,
|
||||
leading: Padding(
|
||||
padding: EdgeInsetsDirectional.only(start: 24.0.w()),
|
||||
child: SvgPicture.asset(AssetsManager.logoSmall),
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: Padding(
|
||||
padding: EdgeInsetsDirectional.only(end: 24.0.w()),
|
||||
child: SvgPicture.asset(
|
||||
AssetsManager.menu,
|
||||
height: 32.0.w(),
|
||||
width: 32.0.w(),
|
||||
),
|
||||
),
|
||||
onPressed: () => key.currentState!.openDrawer(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
drawer: TabletNavigationWidget(
|
||||
currentIndex: 1, // Home is index 0
|
||||
onTabChanged: (index) {
|
||||
// Handle navigation to other tabs
|
||||
switch (index) {
|
||||
case 0:
|
||||
Router.neglect(context, () => context.go('/home'));
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
// Navigate to profile
|
||||
context.pop();
|
||||
Router.neglect(context, () => context.go('/profile'));
|
||||
break;
|
||||
}
|
||||
},
|
||||
),
|
||||
body: Center(
|
||||
child: SizedBox(
|
||||
width: 720,
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 64.0.h()),
|
||||
SizedBox(height: 64.0),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8.0.w()),
|
||||
child: TabletDesktopAppbar(),
|
||||
|
||||
Reference in New Issue
Block a user