tablet navigation bar fixed
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
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/assets.dart';
|
||||
import 'package:tm_app/core/constants/strings.dart';
|
||||
import 'package:tm_app/core/routes/app_routes.dart';
|
||||
import 'package:tm_app/view_models/home_view_model.dart';
|
||||
import 'package:tm_app/view_models/profile_view_model.dart';
|
||||
|
||||
import '../../../core/theme/colors.dart';
|
||||
import '../../../core/utils/size_config.dart';
|
||||
import '../../shared/tablet_navigation_widget.dart';
|
||||
import '../widgets/theme_toggle.dart';
|
||||
import '../widgets/title_description.dart';
|
||||
|
||||
@@ -49,6 +52,7 @@ class _TabletProfilePageState extends State<TabletProfilePage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final GlobalKey<ScaffoldState> key = GlobalKey();
|
||||
return Consumer<ProfileViewModel>(
|
||||
builder: (context, viewModel, child) {
|
||||
if (viewModel.isLoading) {
|
||||
@@ -62,7 +66,49 @@ class _TabletProfilePageState extends State<TabletProfilePage> {
|
||||
|
||||
return SafeArea(
|
||||
child: 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: 2,
|
||||
onTabChanged: (index) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
context.pop();
|
||||
Router.neglect(context, () => context.go('/home'));
|
||||
context.read<HomeViewModel>().init();
|
||||
break;
|
||||
case 1:
|
||||
context.pop();
|
||||
Router.neglect(context, () => context.go('/tenders'));
|
||||
break;
|
||||
}
|
||||
},
|
||||
),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 24.0.w(),
|
||||
|
||||
Reference in New Issue
Block a user