fixed safe area

This commit is contained in:
amirrezaghabeli
2025-09-27 08:55:57 +03:30
parent e432853478
commit ac57392919
3 changed files with 46 additions and 46 deletions
+21 -19
View File
@@ -81,25 +81,27 @@ class _TenderDetailMobilePageState extends State<TenderDetailMobilePage> {
context: context,
title: TenderDetailsStrings.tenderDetailTitle,
),
body: Consumer<TenderDetailViewModel>(
builder: (context, tenderViewModel, child) {
if (tenderViewModel.isLoading) {
return const Center(
child: CircularProgressIndicator(color: AppColors.secondary50),
);
}
body: SafeArea(
child: Consumer<TenderDetailViewModel>(
builder: (context, tenderViewModel, child) {
if (tenderViewModel.isLoading) {
return const Center(
child: CircularProgressIndicator(color: AppColors.secondary50),
);
}
if (tenderViewModel.errorMessage != null) {
return Center(child: Text(tenderViewModel.errorMessage!));
}
if (tenderViewModel.errorMessage != null) {
return Center(child: Text(tenderViewModel.errorMessage!));
}
final detail = tenderViewModel.tenderDetail;
if (detail == null) {
return const Center(child: Text(TenderDetailsStrings.tenderNoData));
}
final detail = tenderViewModel.tenderDetail;
if (detail == null) {
return const Center(
child: Text(TenderDetailsStrings.tenderNoData),
);
}
return SafeArea(
child: SingleChildScrollView(
return SingleChildScrollView(
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: 16.0.w(),
@@ -116,9 +118,9 @@ class _TenderDetailMobilePageState extends State<TenderDetailMobilePage> {
],
),
),
),
);
},
);
},
),
),
);
}
+21 -21
View File
@@ -18,23 +18,23 @@ class MobileHomePage extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: tenderMobileAppBar(title: HomeStrings.home),
body: Consumer<HomeViewModel>(
builder: (context, homeViewModel, child) {
if (homeViewModel.isLoading) {
return const Center(
child: CircularProgressIndicator(color: AppColors.secondary50),
);
}
body: SafeArea(
child: Consumer<HomeViewModel>(
builder: (context, homeViewModel, child) {
if (homeViewModel.isLoading) {
return const Center(
child: CircularProgressIndicator(color: AppColors.secondary50),
);
}
if (homeViewModel.errorMessage != null) {
return Center(child: Text(homeViewModel.errorMessage!));
}
if (homeViewModel.errorMessage != null) {
return Center(child: Text(homeViewModel.errorMessage!));
}
if (homeViewModel.tenderApprovalsStateResponse != null &&
homeViewModel.data != null &&
homeViewModel.feedbackStats != null) {
return SafeArea(
child: SingleChildScrollView(
if (homeViewModel.tenderApprovalsStateResponse != null &&
homeViewModel.data != null &&
homeViewModel.feedbackStats != null) {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -54,13 +54,13 @@ class MobileHomePage extends StatelessWidget {
_bottomListView(homeViewModel),
],
),
),
);
}
return const Center(
child: CircularProgressIndicator(color: AppColors.secondary50),
);
}
return const Center(
child: CircularProgressIndicator(color: AppColors.secondary50),
);
},
},
),
),
);
}
+4 -6
View File
@@ -43,14 +43,12 @@ class _MobileTendersPageState extends State<MobileTendersPage> {
return Scaffold(
backgroundColor: AppColors.backgroundColor,
appBar: tenderMobileAppBar(title: TendersStrings.tendersTitle),
body: SingleChildScrollView(
body: SafeArea(
child: Consumer<TendersViewModel>(
builder: (context, viewModel, child) {
if (viewModel.isLoading) {
return const Expanded(
child: Center(
child: CircularProgressIndicator(color: AppColors.jellyBean),
),
return const Center(
child: CircularProgressIndicator(color: AppColors.jellyBean),
);
}
if (viewModel.errorMessage != null) {
@@ -63,7 +61,7 @@ class _MobileTendersPageState extends State<MobileTendersPage> {
return const Center(child: Text(CommonStrings.noData));
}
return SafeArea(
return SingleChildScrollView(
child: Padding(
padding: EdgeInsets.symmetric(vertical: 18.0.h()),
child: MainTendersSlider(