tablet navigation bar fixed
This commit is contained in:
@@ -87,4 +87,6 @@ class AppStrings {
|
||||
static const String tenderMatchPercentageExample = '75%';
|
||||
static const String locationDescription =
|
||||
'Luleå Municipality is procuring on behalf of Norrbotten’s e-board (all municipalities in Norrbotten).
The procurement includes operation, support, and further development of the existing open e-platform.
No additional information, amendments, or answers to questions will be provided after June 16.o additional information, amendments, or answers to questions will be provided after June 16.o additional information, amendments, or answers to questions will be provided after June 16.website: www.tenders.com Lorem ipsum is amet Luleå Municipality is procuring on behalf of Norrbotten’s e-board (all municipalities in Norrbotten).
The procurement includes operation, support, and further development of the existing open e-platform.
No additional information, amendments, or answers to questions will be provided after June 16. o additional information, amendments, or answers to questions will be provided after June 16. o additional information, amendments, or answers to questions will be provided after June 16.website: www.tenders.com';
|
||||
static const String estimatedValue = 'Estimated Value ';
|
||||
static const String duration = 'Duration';
|
||||
}
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:tm_app/core/constants/assets.dart';
|
||||
import 'package:tm_app/core/constants/strings.dart';
|
||||
import 'package:tm_app/core/theme/colors.dart';
|
||||
import 'package:tm_app/core/utils/size_config.dart';
|
||||
|
||||
class TabletShellPage extends StatelessWidget {
|
||||
TabletShellPage({
|
||||
const TabletShellPage({
|
||||
required this.navigationShell,
|
||||
required this.onTap,
|
||||
super.key,
|
||||
@@ -16,106 +11,8 @@ class TabletShellPage extends StatelessWidget {
|
||||
final StatefulNavigationShell navigationShell;
|
||||
final ValueChanged<int> onTap;
|
||||
|
||||
final GlobalKey<ScaffoldState> _key = GlobalKey();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
key: _key,
|
||||
body: Stack(
|
||||
children: [
|
||||
navigationShell,
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 64.0.h(),
|
||||
padding: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.backgroundColor,
|
||||
border: Border(
|
||||
bottom: BorderSide(color: AppColors.grey30, width: 1),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
SvgPicture.asset(AssetsManager.logoSmall),
|
||||
InkWell(
|
||||
onTap: () => _key.currentState!.openDrawer(),
|
||||
child: SvgPicture.asset(AssetsManager.menu),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
drawer: Container(
|
||||
width: 200.0.w(),
|
||||
height: double.infinity,
|
||||
color: AppColors.backgroundColor,
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(height: 48.0.h()),
|
||||
_drawerItem(
|
||||
context: context,
|
||||
text: AppStrings.home,
|
||||
isActive: navigationShell.currentIndex == 0,
|
||||
onTap: () => onTap(0),
|
||||
iconPath: AssetsManager.home,
|
||||
activeIconPath: AssetsManager.homeActive,
|
||||
),
|
||||
_drawerItem(
|
||||
context: context,
|
||||
text: AppStrings.tendersTitle,
|
||||
isActive: navigationShell.currentIndex == 1,
|
||||
onTap: () => onTap(1),
|
||||
iconPath: AssetsManager.tenders,
|
||||
activeIconPath: AssetsManager.tendersActive,
|
||||
),
|
||||
_drawerItem(
|
||||
context: context,
|
||||
text: AppStrings.profile,
|
||||
isActive: navigationShell.currentIndex == 2,
|
||||
onTap: () => onTap(2),
|
||||
iconPath: AssetsManager.profile,
|
||||
activeIconPath: AssetsManager.profileActive,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _drawerItem({
|
||||
required BuildContext context,
|
||||
required String text,
|
||||
required bool isActive,
|
||||
required VoidCallback onTap,
|
||||
required String iconPath,
|
||||
required String activeIconPath,
|
||||
}) {
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
child: SizedBox(
|
||||
width: 200.0.w(),
|
||||
height: 64.0.h(),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.only(start: 24.0.w()),
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset(isActive ? activeIconPath : iconPath),
|
||||
SizedBox(width: 8.0.w()),
|
||||
Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
fontSize: 12.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
color: isActive ? AppColors.primaryColor : AppColors.grey60,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
return Scaffold(body: navigationShell);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ extension DisplaySizeDetector on Size {
|
||||
DisplaySize get displaySize {
|
||||
if (width < 600) {
|
||||
return DisplaySize.extraSmall;
|
||||
} else if (width < 1024) {
|
||||
} else if (width <= 1024) {
|
||||
return DisplaySize.small;
|
||||
} else if (width < 1440) {
|
||||
return DisplaySize.medium;
|
||||
|
||||
Reference in New Issue
Block a user