Added SafeArea to all page

This commit is contained in:
llsajjad
2025-09-24 13:19:37 +03:30
parent 7456418ea2
commit e5cf89c2ce
23 changed files with 1060 additions and 1016 deletions
@@ -18,7 +18,8 @@ class CompletionOfDocumentsMobilePage extends StatelessWidget {
context: context, context: context,
title: CompletionOfDocumentsStrings.completionOfDocuments, title: CompletionOfDocumentsStrings.completionOfDocuments,
), ),
body: SingleChildScrollView( body: SafeArea(
child: SingleChildScrollView(
padding: EdgeInsets.symmetric(horizontal: 16.0.w(), vertical: 12.0.h()), padding: EdgeInsets.symmetric(horizontal: 16.0.w(), vertical: 12.0.h()),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@@ -229,6 +230,7 @@ class CompletionOfDocumentsMobilePage extends StatelessWidget {
], ],
), ),
), ),
),
); );
} }
@@ -96,7 +96,8 @@ class _TenderDetailDesktopPageState extends State<TenderDetailDesktopPage> {
return const Center(child: Text(TenderDetailsStrings.tenderNoData)); return const Center(child: Text(TenderDetailsStrings.tenderNoData));
} }
return Column( return SafeArea(
child: Column(
children: [ children: [
const DesktopNavigationWidget( const DesktopNavigationWidget(
currentIndex: 1, // Home index currentIndex: 1, // Home index
@@ -134,6 +135,7 @@ class _TenderDetailDesktopPageState extends State<TenderDetailDesktopPage> {
), ),
), ),
], ],
),
); );
}, },
), ),
@@ -102,7 +102,8 @@ class _TenderDetailMobilePageState extends State<TenderDetailMobilePage> {
); );
} }
return SingleChildScrollView( return SafeArea(
child: SingleChildScrollView(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 16.0.w(), horizontal: 16.0.w(),
@@ -119,6 +120,7 @@ class _TenderDetailMobilePageState extends State<TenderDetailMobilePage> {
], ],
), ),
), ),
),
); );
}, },
), ),
@@ -104,7 +104,8 @@ class _TenderDetailTabletPageState extends State<TenderDetailTabletPage> {
if (detail == null) { if (detail == null) {
return const Center(child: Text(TenderDetailsStrings.tenderNoData)); return const Center(child: Text(TenderDetailsStrings.tenderNoData));
} }
return SingleChildScrollView( return SafeArea(
child: SingleChildScrollView(
child: Center( child: Center(
child: SizedBox( child: SizedBox(
width: 768, width: 768,
@@ -128,6 +129,7 @@ class _TenderDetailTabletPageState extends State<TenderDetailTabletPage> {
), ),
), ),
), ),
),
); );
}, },
), ),
@@ -23,7 +23,8 @@ class FinalCompletionOfDocumentsScreen extends StatelessWidget {
return Scaffold( return Scaffold(
body: Consumer<FinalCompletionOfDocumentsViewModel>( body: Consumer<FinalCompletionOfDocumentsViewModel>(
builder: builder:
(context, viewModel, child) => Column( (context, viewModel, child) => SafeArea(
child: Column(
children: [ children: [
const DesktopNavigationWidget(currentIndex: 1), const DesktopNavigationWidget(currentIndex: 1),
const SizedBox(height: 64.0), const SizedBox(height: 64.0),
@@ -74,6 +75,7 @@ class FinalCompletionOfDocumentsScreen extends StatelessWidget {
], ],
), ),
), ),
),
); );
} }
} }
+3 -1
View File
@@ -39,7 +39,8 @@ class DesktopHomePage extends StatelessWidget {
if (homeViewModel.tenderApprovalsStateResponse != null && if (homeViewModel.tenderApprovalsStateResponse != null &&
homeViewModel.data != null && homeViewModel.data != null &&
homeViewModel.feedbackStats != null) { homeViewModel.feedbackStats != null) {
return SingleChildScrollView( return SafeArea(
child: SingleChildScrollView(
child: SizedBox( child: SizedBox(
width: 780, width: 780,
child: Column( child: Column(
@@ -61,6 +62,7 @@ class DesktopHomePage extends StatelessWidget {
], ],
), ),
), ),
),
); );
} }
return const Center( return const Center(
+3 -1
View File
@@ -33,7 +33,8 @@ class MobileHomePage extends StatelessWidget {
if (homeViewModel.tenderApprovalsStateResponse != null && if (homeViewModel.tenderApprovalsStateResponse != null &&
homeViewModel.data != null && homeViewModel.data != null &&
homeViewModel.feedbackStats != null) { homeViewModel.feedbackStats != null) {
return SingleChildScrollView( return SafeArea(
child: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@@ -53,6 +54,7 @@ class MobileHomePage extends StatelessWidget {
_bottomListView(homeViewModel), _bottomListView(homeViewModel),
], ],
), ),
),
); );
} }
return const Center( return const Center(
+2
View File
@@ -50,6 +50,7 @@ class TabletHomePage extends StatelessWidget {
24.0.w(), 24.0.w(),
24.0.h(), 24.0.h(),
), ),
child: SafeArea(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@@ -70,6 +71,7 @@ class TabletHomePage extends StatelessWidget {
], ],
), ),
), ),
),
); );
} }
return const Center( return const Center(
@@ -59,7 +59,8 @@ class _LikedTendersDesktopPageState extends State<LikedTendersDesktopPage> {
key: scaffoldKey, key: scaffoldKey,
backgroundColor: AppColors.backgroundColor, backgroundColor: AppColors.backgroundColor,
endDrawer: const LikeFiltersDrawer(), endDrawer: const LikeFiltersDrawer(),
body: Column( body: SafeArea(
child: Column(
children: [ children: [
const DesktopNavigationWidget(currentIndex: 1, haveFilter: true), const DesktopNavigationWidget(currentIndex: 1, haveFilter: true),
const SizedBox(height: 40), const SizedBox(height: 40),
@@ -126,6 +127,7 @@ class _LikedTendersDesktopPageState extends State<LikedTendersDesktopPage> {
], ],
), ),
), ),
),
); );
} }
@@ -156,7 +156,8 @@ class _LikedTendersMobilePageState extends State<LikedTendersMobilePage> {
), ),
), ),
body: Column( body: SafeArea(
child: Column(
children: [ children: [
Expanded( Expanded(
child: Consumer<LikedTendersViewModel>( child: Consumer<LikedTendersViewModel>(
@@ -243,6 +244,7 @@ class _LikedTendersMobilePageState extends State<LikedTendersMobilePage> {
], ],
), ),
), ),
),
); );
} }
} }
@@ -63,7 +63,8 @@ class _LikedTendersTabletPageState extends State<LikedTendersTabletPage> {
backgroundColor: AppColors.backgroundColor, backgroundColor: AppColors.backgroundColor,
appBar: tabletAppBar(title: LikedTendersStrings.likedTenders, key: key), appBar: tabletAppBar(title: LikedTendersStrings.likedTenders, key: key),
drawer: const TabletNavigationWidget(currentIndex: 1), drawer: const TabletNavigationWidget(currentIndex: 1),
body: Center( body: SafeArea(
child: Center(
child: SizedBox( child: SizedBox(
width: 720, width: 720,
child: Column( child: Column(
@@ -140,6 +141,7 @@ class _LikedTendersTabletPageState extends State<LikedTendersTabletPage> {
), ),
), ),
), ),
),
); );
} }
+3 -1
View File
@@ -64,7 +64,8 @@ class _DesktopProfilePageState extends State<DesktopProfilePage> {
return const Center(child: Text(CommonStrings.noData)); return const Center(child: Text(CommonStrings.noData));
} }
return Column( return SafeArea(
child: Column(
children: [ children: [
const DesktopNavigationWidget( const DesktopNavigationWidget(
currentIndex: 4, // Tenders index currentIndex: 4, // Tenders index
@@ -143,6 +144,7 @@ class _DesktopProfilePageState extends State<DesktopProfilePage> {
), ),
), ),
], ],
),
); );
}, },
), ),
+3 -1
View File
@@ -66,7 +66,8 @@ class _MobileProfilePageState extends State<MobileProfilePage> {
return const Center(child: Text(CommonStrings.noData)); return const Center(child: Text(CommonStrings.noData));
} }
return Padding( return SafeArea(
child: Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 24.0.w(), horizontal: 24.0.w(),
vertical: 16.0.h(), vertical: 16.0.h(),
@@ -137,6 +138,7 @@ class _MobileProfilePageState extends State<MobileProfilePage> {
), ),
], ],
), ),
),
); );
}, },
), ),
+3 -3
View File
@@ -64,14 +64,14 @@ class _TabletProfilePageState extends State<TabletProfilePage> {
return const Center(child: Text(CommonStrings.noData)); return const Center(child: Text(CommonStrings.noData));
} }
return SafeArea( return Scaffold(
child: Scaffold(
key: key, key: key,
backgroundColor: AppColors.backgroundColor, backgroundColor: AppColors.backgroundColor,
appBar: tabletAppBar(title: ProfileStrings.profileTitle, key: key), appBar: tabletAppBar(title: ProfileStrings.profileTitle, key: key),
drawer: const TabletNavigationWidget(currentIndex: 4), drawer: const TabletNavigationWidget(currentIndex: 4),
body: Padding( body: SafeArea(
child: Padding(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 24.0.w(), horizontal: 24.0.w(),
vertical: 16.0.h(), vertical: 16.0.h(),
+3 -1
View File
@@ -41,12 +41,14 @@ class _DesktopSplashPageState extends State<DesktopSplashPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
body: Center( body: SafeArea(
child: Center(
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 100), padding: const EdgeInsets.symmetric(horizontal: 100),
child: Image.asset(AssetsManager.logoBigPng), child: Image.asset(AssetsManager.logoBigPng),
), ),
), ),
),
); );
} }
} }
+3 -1
View File
@@ -53,12 +53,14 @@ class _MobileSplashPageState extends State<MobileSplashPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
body: Center( body: SafeArea(
child: Center(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24.0.w()), padding: EdgeInsets.symmetric(horizontal: 24.0.w()),
child: Image.asset(AssetsManager.logoBigPng, fit: BoxFit.cover), child: Image.asset(AssetsManager.logoBigPng, fit: BoxFit.cover),
), ),
), ),
),
); );
} }
} }
+3 -1
View File
@@ -41,12 +41,14 @@ class _TabletSplashPageState extends State<TabletSplashPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
body: Center( body: SafeArea(
child: Center(
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 40), padding: const EdgeInsets.symmetric(horizontal: 40),
child: Image.asset(AssetsManager.logoBigPng), child: Image.asset(AssetsManager.logoBigPng),
), ),
), ),
),
); );
} }
} }
+3 -1
View File
@@ -51,7 +51,8 @@ class _DesktopTendersPageState extends State<DesktopTendersPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.backgroundColor, backgroundColor: AppColors.backgroundColor,
body: Column( body: SafeArea(
child: Column(
children: [ children: [
const DesktopNavigationWidget(currentIndex: 1), const DesktopNavigationWidget(currentIndex: 1),
SizedBox(height: 48.0.h()), SizedBox(height: 48.0.h()),
@@ -104,6 +105,7 @@ class _DesktopTendersPageState extends State<DesktopTendersPage> {
), ),
], ],
), ),
),
); );
} }
} }
+3 -1
View File
@@ -60,11 +60,13 @@ class _MobileTendersPageState extends State<MobileTendersPage> {
return const Center(child: Text(CommonStrings.noData)); return const Center(child: Text(CommonStrings.noData));
} }
return Padding( return SafeArea(
child: Padding(
padding: EdgeInsets.symmetric(vertical: 18.0.h()), padding: EdgeInsets.symmetric(vertical: 18.0.h()),
child: MainTendersSlider( child: MainTendersSlider(
tenders: viewModel.tendersResponse?.data?.tenders ?? [], tenders: viewModel.tendersResponse?.data?.tenders ?? [],
), ),
),
); );
}, },
), ),
@@ -51,6 +51,7 @@ class _TabletTendersPageState extends State<TabletTendersPage> {
} }
return Expanded( return Expanded(
child: SingleChildScrollView( child: SingleChildScrollView(
child: SafeArea(
child: Padding( child: Padding(
padding: EdgeInsetsDirectional.only( padding: EdgeInsetsDirectional.only(
end: 24.0.w(), end: 24.0.w(),
@@ -61,6 +62,7 @@ class _TabletTendersPageState extends State<TabletTendersPage> {
), ),
), ),
), ),
),
); );
}, },
), ),
@@ -39,7 +39,8 @@ class _YourTendersDesktopPageState extends State<YourTendersDesktopPage>
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.backgroundColor, backgroundColor: AppColors.backgroundColor,
body: Column( body: SafeArea(
child: Column(
children: [ children: [
const DesktopNavigationWidget(currentIndex: 1), // Tenders index const DesktopNavigationWidget(currentIndex: 1), // Tenders index
Expanded( Expanded(
@@ -122,6 +123,7 @@ class _YourTendersDesktopPageState extends State<YourTendersDesktopPage>
), ),
], ],
), ),
),
); );
} }
@@ -38,7 +38,8 @@ class _YourTendersMobilePageState extends State<YourTendersMobilePage> {
return Scaffold( return Scaffold(
backgroundColor: AppColors.backgroundColor, backgroundColor: AppColors.backgroundColor,
appBar: appBar(context: context, title: YourTendersStrings.yourTenders), appBar: appBar(context: context, title: YourTendersStrings.yourTenders),
body: Column( body: SafeArea(
child: Column(
children: [ children: [
const FilterButton(platformType: PlatformType.mobile), const FilterButton(platformType: PlatformType.mobile),
Expanded( Expanded(
@@ -104,6 +105,7 @@ class _YourTendersMobilePageState extends State<YourTendersMobilePage> {
), ),
], ],
), ),
),
); );
} }
} }
@@ -44,7 +44,8 @@ class _YourTendersTabletPageState extends State<YourTendersTabletPage>
backgroundColor: AppColors.backgroundColor, backgroundColor: AppColors.backgroundColor,
appBar: tabletAppBar(title: YourTendersStrings.yourTenders, key: key), appBar: tabletAppBar(title: YourTendersStrings.yourTenders, key: key),
drawer: const TabletNavigationWidget(currentIndex: 1), drawer: const TabletNavigationWidget(currentIndex: 1),
body: Center( body: SafeArea(
child: Center(
child: SizedBox( child: SizedBox(
width: 720, width: 720,
child: Column( child: Column(
@@ -125,6 +126,7 @@ class _YourTendersTabletPageState extends State<YourTendersTabletPage>
), ),
), ),
), ),
),
); );
} }