Merge pull request 'changed safe areas and filter string' (#180) from fixes into main

Reviewed-on: https://repo.ravanertebat.com/TM/tm_app/pulls/180
This commit is contained in:
a.ghabeli
2025-09-28 08:51:20 +03:30
5 changed files with 104 additions and 103 deletions
@@ -75,14 +75,14 @@ class _TenderDetailMobilePageState extends State<TenderDetailMobilePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.backgroundColor,
appBar: appBar(
context: context,
title: TenderDetailsStrings.tenderDetailTitle,
),
body: SafeArea(
child: Consumer<TenderDetailViewModel>(
return SafeArea(
child: Scaffold(
backgroundColor: AppColors.backgroundColor,
appBar: appBar(
context: context,
title: TenderDetailsStrings.tenderDetailTitle,
),
body: Consumer<TenderDetailViewModel>(
builder: (context, tenderViewModel, child) {
if (tenderViewModel.isLoading) {
return const Center(
@@ -70,94 +70,94 @@ class _LikedTendersMobilePageState extends State<LikedTendersMobilePage> {
});
}
},
child: Scaffold(
backgroundColor: AppColors.backgroundColor,
appBar: PreferredSize(
preferredSize: const Size.fromHeight(60),
child: AppBar(
backgroundColor: AppColors.backgroundColor,
elevation: 0,
titleSpacing: 0,
leading: IconButton(
icon: SvgPicture.asset(
AssetsManager.arrowLeft,
height: 24.0.w(),
width: 24.0.w(),
),
onPressed: () => Navigator.pop(context),
),
title: Text(
LikedTendersStrings.likedTenders,
style: TextStyle(
color: AppColors.grey70,
fontWeight: FontWeight.w600,
fontSize: 20.0.sp(),
),
),
actions: [
IconButton(
child: SafeArea(
child: Scaffold(
backgroundColor: AppColors.backgroundColor,
appBar: PreferredSize(
preferredSize: const Size.fromHeight(60),
child: AppBar(
backgroundColor: AppColors.backgroundColor,
elevation: 0,
titleSpacing: 0,
leading: IconButton(
icon: SvgPicture.asset(
AssetsManager.filter,
AssetsManager.arrowLeft,
height: 24.0.w(),
width: 24.0.w(),
),
onPressed: () {
showModalBottomSheet(
backgroundColor: AppColors.backgroundColor,
context: context,
isScrollControlled: true,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(20),
),
),
builder: (context) {
return Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 10.0.h()),
Text(
LikedTendersStrings.filter,
style: TextStyle(
fontWeight: FontWeight.w600,
color: AppColors.grey70,
fontSize: 20.0.sp(),
),
),
SizedBox(height: 20.0.h()),
_buildFilterOption('Industry'),
_buildFilterOption('Finance'),
_buildFilterOption('Business'),
_buildFilterOption('IT'),
_buildFilterOption('Software'),
SizedBox(height: 20.0.h()),
BaseButton(
backgroundColor: AppColors.primary2,
borderRadius: 24,
isEnabled: true,
onPressed: () {
Navigator.pop(context);
},
text: 'Apply',
textColor: AppColors.textBlue,
),
],
),
);
},
);
},
onPressed: () => Navigator.pop(context),
),
title: Text(
LikedTendersStrings.likedTenders,
style: TextStyle(
color: AppColors.grey70,
fontWeight: FontWeight.w600,
fontSize: 20.0.sp(),
),
),
actions: [
IconButton(
icon: SvgPicture.asset(
AssetsManager.filter,
height: 24.0.w(),
width: 24.0.w(),
),
onPressed: () {
showModalBottomSheet(
backgroundColor: AppColors.backgroundColor,
context: context,
isScrollControlled: true,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(20),
),
),
builder: (context) {
return Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(height: 10.0.h()),
Text(
LikedTendersStrings.filter,
style: TextStyle(
fontWeight: FontWeight.w600,
color: AppColors.grey70,
fontSize: 20.0.sp(),
),
),
SizedBox(height: 20.0.h()),
_buildFilterOption('Industry'),
_buildFilterOption('Finance'),
_buildFilterOption('Business'),
_buildFilterOption('IT'),
_buildFilterOption('Software'),
SizedBox(height: 20.0.h()),
BaseButton(
backgroundColor: AppColors.primary2,
borderRadius: 24,
isEnabled: true,
onPressed: () {
Navigator.pop(context);
},
text: 'Apply',
textColor: AppColors.textBlue,
),
],
),
);
},
);
},
),
SizedBox(width: 16.0.w()),
],
SizedBox(width: 16.0.w()),
],
),
),
),
body: SafeArea(
child: Column(
body: Column(
children: [
Expanded(
child: Consumer<LikedTendersViewModel>(
@@ -170,22 +170,22 @@ class _LikedTendersMobilePageState extends State<LikedTendersMobilePage> {
),
);
}
if (viewModel.errorMessage != null) {
return Center(child: Text(viewModel.errorMessage!));
}
final feedback = viewModel.data?.data?.feedback ?? [];
if (feedback.isEmpty) {
return const Center(
child: Text(LikedTendersStrings.noLikedTenders),
);
}
final itemCount =
feedback.length + (viewModel.isLoadingMore ? 1 : 0);
return ListView.builder(
controller: _scrollController,
padding: EdgeInsets.symmetric(
@@ -196,7 +196,7 @@ class _LikedTendersMobilePageState extends State<LikedTendersMobilePage> {
itemBuilder: (context, index) {
if (index < feedback.length) {
final item = feedback[index];
return Padding(
padding: EdgeInsets.only(bottom: 20.0.h()),
child: Dismissible(
@@ -35,11 +35,11 @@ class _YourTendersMobilePageState extends State<YourTendersMobilePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.backgroundColor,
appBar: appBar(context: context, title: YourTendersStrings.yourTenders),
body: SafeArea(
child: Column(
return SafeArea(
child: Scaffold(
backgroundColor: AppColors.backgroundColor,
appBar: appBar(context: context, title: YourTendersStrings.yourTenders),
body: Column(
children: [
const FilterButton(platformType: PlatformType.mobile),
Expanded(
@@ -55,11 +55,11 @@ class _YourTendersMobilePageState extends State<YourTendersMobilePage> {
),
);
}
if (viewModel.errorMessage != null) {
return Center(child: Text(viewModel.errorMessage!));
}
return Column(
children: [
if (viewModel.selectedStatus ==
@@ -15,10 +15,11 @@ class YourTendersStrings {
static const approvedTenders = 'Approved tenders';
static const noTenders = 'No data available';
static const selectPublicationRangeDate = 'Select publication date range';
static const selectCreationRangeDate = 'Select Creation date range';
static const noLikedTenders = 'You havent liked any tenders yet !';
static const noDislikedTenders = 'You havent disliked any tenders yet !';
static const noTendersSubmitted = 'You havent submitted any tenders yet !';
static const page = 'Page';
static const of = 'of';
static const selectPage ='Select Page';
static const selectPage = 'Select Page';
}
@@ -115,7 +115,7 @@ class YourTendersFilterDialog extends StatelessWidget {
),
SizedBox(height: 16.0.h()),
Text(
YourTendersStrings.selectPublicationRangeDate,
YourTendersStrings.selectCreationRangeDate,
style: TextStyle(
fontSize: 16.0.sp(),
fontWeight: FontWeight.w600,