Added SafeArea to all page
This commit is contained in:
@@ -18,215 +18,217 @@ class CompletionOfDocumentsMobilePage extends StatelessWidget {
|
|||||||
context: context,
|
context: context,
|
||||||
title: CompletionOfDocumentsStrings.completionOfDocuments,
|
title: CompletionOfDocumentsStrings.completionOfDocuments,
|
||||||
),
|
),
|
||||||
body: SingleChildScrollView(
|
body: SafeArea(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.0.w(), vertical: 12.0.h()),
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
padding: EdgeInsets.symmetric(horizontal: 16.0.w(), vertical: 12.0.h()),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Container(
|
children: [
|
||||||
width: double.infinity,
|
Container(
|
||||||
height: 24.0.h(),
|
width: double.infinity,
|
||||||
padding: EdgeInsets.symmetric(horizontal: 8.0.w()),
|
height: 24.0.h(),
|
||||||
decoration: BoxDecoration(
|
padding: EdgeInsets.symmetric(horizontal: 8.0.w()),
|
||||||
color: AppColors.primary20,
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(4),
|
color: AppColors.primary20,
|
||||||
),
|
borderRadius: BorderRadius.circular(4),
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
CompletionOfDocumentsStrings.submissionDeadline,
|
|
||||||
style: TextStyle(
|
|
||||||
color: AppColors.textBlue,
|
|
||||||
fontSize: 14.0.sp(),
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'2025-06-15',
|
|
||||||
style: TextStyle(
|
|
||||||
color: AppColors.grey80,
|
|
||||||
fontSize: 14.0.sp(),
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 12.0.h()),
|
|
||||||
Container(
|
|
||||||
height: 58.0.h(),
|
|
||||||
width: double.infinity,
|
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
horizontal: 12.0.w(),
|
|
||||||
vertical: 8.0.h(),
|
|
||||||
),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: Border.all(color: AppColors.orange10),
|
|
||||||
borderRadius: BorderRadius.circular(8),
|
|
||||||
color: AppColors.orange0,
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'Match with your profile',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.0.sp(),
|
|
||||||
color: AppColors.grey80,
|
|
||||||
fontWeight: FontWeight.w400,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const Spacer(),
|
|
||||||
Text(
|
|
||||||
'75%',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.0.sp(),
|
|
||||||
color: AppColors.cyanTeal,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 4.0.h()),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: LinearProgressIndicator(
|
|
||||||
value: 0.75,
|
|
||||||
backgroundColor: const Color(0xFFE0E0E0),
|
|
||||||
color: AppColors.cyanTeal,
|
|
||||||
minHeight: 6,
|
|
||||||
borderRadius: BorderRadius.circular(10),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 16.0.h()),
|
|
||||||
_docCard(
|
|
||||||
title: 'Company Registration Certificate',
|
|
||||||
subtitle: 'Legal document proving business registration',
|
|
||||||
status: 'Completed',
|
|
||||||
statusColor: AppColors.green30,
|
|
||||||
statusBackgroundColor: AppColors.green10,
|
|
||||||
backgroundColor: AppColors.primary10,
|
|
||||||
borderSideColor: AppColors.primary20,
|
|
||||||
),
|
|
||||||
_docCard(
|
|
||||||
title: 'Tax Compliance Certificate',
|
|
||||||
subtitle: 'Proof of tax registration and compliance',
|
|
||||||
status: 'Completed',
|
|
||||||
statusColor: AppColors.green30,
|
|
||||||
statusBackgroundColor: AppColors.green10,
|
|
||||||
backgroundColor: AppColors.primary10,
|
|
||||||
borderSideColor: AppColors.primary30,
|
|
||||||
),
|
|
||||||
_docCard(
|
|
||||||
title: 'Technical Proposal',
|
|
||||||
subtitle: 'Detailed technical solution for the tender',
|
|
||||||
status: 'Incomplete',
|
|
||||||
statusColor: AppColors.red20,
|
|
||||||
statusBackgroundColor: AppColors.red10,
|
|
||||||
backgroundColor: AppColors.red0,
|
|
||||||
tag: 'Self apply',
|
|
||||||
tagColor: AppColors.green30,
|
|
||||||
borderSideColor: AppColors.red10,
|
|
||||||
tagBackgroundColor: AppColors.green20,
|
|
||||||
),
|
|
||||||
_docCard(
|
|
||||||
title: 'Financial Proposal',
|
|
||||||
subtitle: 'Detailed cost breakdown and pricing',
|
|
||||||
status: 'Incomplete',
|
|
||||||
statusColor: AppColors.red20,
|
|
||||||
statusBackgroundColor: AppColors.red10,
|
|
||||||
backgroundColor: AppColors.red0,
|
|
||||||
tag: 'Partnership',
|
|
||||||
tagColor: AppColors.purple,
|
|
||||||
borderSideColor: AppColors.red10,
|
|
||||||
tagBackgroundColor: AppColors.purpleLight,
|
|
||||||
),
|
|
||||||
_docCard(
|
|
||||||
title: 'Financial Proposal',
|
|
||||||
subtitle: 'Detailed cost breakdown and pricing',
|
|
||||||
status: 'Incomplete',
|
|
||||||
statusColor: AppColors.red20,
|
|
||||||
statusBackgroundColor: AppColors.red10,
|
|
||||||
backgroundColor: AppColors.red0,
|
|
||||||
borderSideColor: AppColors.red10,
|
|
||||||
),
|
|
||||||
SizedBox(height: 16.0.h()),
|
|
||||||
|
|
||||||
Text(
|
|
||||||
CompletionOfDocumentsStrings.setDeadline,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 16.0.sp(),
|
|
||||||
color: AppColors.grey80,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 8.0.h()),
|
|
||||||
Container(
|
|
||||||
height: 48.0.h(),
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 12.0.w()),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: Border.all(color: AppColors.grey40),
|
|
||||||
borderRadius: BorderRadius.circular(12),
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'2025/04/10',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 16.0.sp(),
|
|
||||||
fontWeight: FontWeight.w700,
|
|
||||||
color: AppColors.grey60,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SvgPicture.asset(
|
|
||||||
AssetsManager.calendar,
|
|
||||||
height: 24.0.h(),
|
|
||||||
width: 24.0.w(),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 16.0.h()),
|
|
||||||
|
|
||||||
Container(
|
|
||||||
padding: const EdgeInsets.all(12),
|
|
||||||
height: 100.0.h(),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: Border.all(color: AppColors.borderColor),
|
|
||||||
borderRadius: BorderRadius.circular(8),
|
|
||||||
color: AppColors.grey0,
|
|
||||||
),
|
|
||||||
child: TextField(
|
|
||||||
maxLines: null,
|
|
||||||
decoration: const InputDecoration.collapsed(
|
|
||||||
hintText: CompletionOfDocumentsStrings.note,
|
|
||||||
),
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
CompletionOfDocumentsStrings.submissionDeadline,
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.textBlue,
|
||||||
|
fontSize: 14.0.sp(),
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'2025-06-15',
|
||||||
|
style: TextStyle(
|
||||||
|
color: AppColors.grey80,
|
||||||
|
fontSize: 14.0.sp(),
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 12.0.h()),
|
||||||
|
Container(
|
||||||
|
height: 58.0.h(),
|
||||||
|
width: double.infinity,
|
||||||
|
padding: EdgeInsets.symmetric(
|
||||||
|
horizontal: 12.0.w(),
|
||||||
|
vertical: 8.0.h(),
|
||||||
|
),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(color: AppColors.orange10),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
color: AppColors.orange0,
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'Match with your profile',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12.0.sp(),
|
||||||
|
color: AppColors.grey80,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Spacer(),
|
||||||
|
Text(
|
||||||
|
'75%',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12.0.sp(),
|
||||||
|
color: AppColors.cyanTeal,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 4.0.h()),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: LinearProgressIndicator(
|
||||||
|
value: 0.75,
|
||||||
|
backgroundColor: const Color(0xFFE0E0E0),
|
||||||
|
color: AppColors.cyanTeal,
|
||||||
|
minHeight: 6,
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 16.0.h()),
|
||||||
|
_docCard(
|
||||||
|
title: 'Company Registration Certificate',
|
||||||
|
subtitle: 'Legal document proving business registration',
|
||||||
|
status: 'Completed',
|
||||||
|
statusColor: AppColors.green30,
|
||||||
|
statusBackgroundColor: AppColors.green10,
|
||||||
|
backgroundColor: AppColors.primary10,
|
||||||
|
borderSideColor: AppColors.primary20,
|
||||||
|
),
|
||||||
|
_docCard(
|
||||||
|
title: 'Tax Compliance Certificate',
|
||||||
|
subtitle: 'Proof of tax registration and compliance',
|
||||||
|
status: 'Completed',
|
||||||
|
statusColor: AppColors.green30,
|
||||||
|
statusBackgroundColor: AppColors.green10,
|
||||||
|
backgroundColor: AppColors.primary10,
|
||||||
|
borderSideColor: AppColors.primary30,
|
||||||
|
),
|
||||||
|
_docCard(
|
||||||
|
title: 'Technical Proposal',
|
||||||
|
subtitle: 'Detailed technical solution for the tender',
|
||||||
|
status: 'Incomplete',
|
||||||
|
statusColor: AppColors.red20,
|
||||||
|
statusBackgroundColor: AppColors.red10,
|
||||||
|
backgroundColor: AppColors.red0,
|
||||||
|
tag: 'Self apply',
|
||||||
|
tagColor: AppColors.green30,
|
||||||
|
borderSideColor: AppColors.red10,
|
||||||
|
tagBackgroundColor: AppColors.green20,
|
||||||
|
),
|
||||||
|
_docCard(
|
||||||
|
title: 'Financial Proposal',
|
||||||
|
subtitle: 'Detailed cost breakdown and pricing',
|
||||||
|
status: 'Incomplete',
|
||||||
|
statusColor: AppColors.red20,
|
||||||
|
statusBackgroundColor: AppColors.red10,
|
||||||
|
backgroundColor: AppColors.red0,
|
||||||
|
tag: 'Partnership',
|
||||||
|
tagColor: AppColors.purple,
|
||||||
|
borderSideColor: AppColors.red10,
|
||||||
|
tagBackgroundColor: AppColors.purpleLight,
|
||||||
|
),
|
||||||
|
_docCard(
|
||||||
|
title: 'Financial Proposal',
|
||||||
|
subtitle: 'Detailed cost breakdown and pricing',
|
||||||
|
status: 'Incomplete',
|
||||||
|
statusColor: AppColors.red20,
|
||||||
|
statusBackgroundColor: AppColors.red10,
|
||||||
|
backgroundColor: AppColors.red0,
|
||||||
|
borderSideColor: AppColors.red10,
|
||||||
|
),
|
||||||
|
SizedBox(height: 16.0.h()),
|
||||||
|
|
||||||
|
Text(
|
||||||
|
CompletionOfDocumentsStrings.setDeadline,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16.0.sp(),
|
fontSize: 16.0.sp(),
|
||||||
color: AppColors.grey60,
|
color: AppColors.grey80,
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
SizedBox(height: 8.0.h()),
|
||||||
SizedBox(height: 24.0.h()),
|
Container(
|
||||||
BaseButton(
|
height: 48.0.h(),
|
||||||
isEnabled: true,
|
padding: EdgeInsets.symmetric(horizontal: 12.0.w()),
|
||||||
onPressed: () {},
|
decoration: BoxDecoration(
|
||||||
text: CompletionOfDocumentsStrings.submitForCompletion,
|
border: Border.all(color: AppColors.grey40),
|
||||||
textColor: AppColors.textBlue,
|
borderRadius: BorderRadius.circular(12),
|
||||||
backgroundColor: AppColors.primary30,
|
),
|
||||||
),
|
child: Row(
|
||||||
],
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'2025/04/10',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16.0.sp(),
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
color: AppColors.grey60,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SvgPicture.asset(
|
||||||
|
AssetsManager.calendar,
|
||||||
|
height: 24.0.h(),
|
||||||
|
width: 24.0.w(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 16.0.h()),
|
||||||
|
|
||||||
|
Container(
|
||||||
|
padding: const EdgeInsets.all(12),
|
||||||
|
height: 100.0.h(),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(color: AppColors.borderColor),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
color: AppColors.grey0,
|
||||||
|
),
|
||||||
|
child: TextField(
|
||||||
|
maxLines: null,
|
||||||
|
decoration: const InputDecoration.collapsed(
|
||||||
|
hintText: CompletionOfDocumentsStrings.note,
|
||||||
|
),
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16.0.sp(),
|
||||||
|
color: AppColors.grey60,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 24.0.h()),
|
||||||
|
BaseButton(
|
||||||
|
isEnabled: true,
|
||||||
|
onPressed: () {},
|
||||||
|
text: CompletionOfDocumentsStrings.submitForCompletion,
|
||||||
|
textColor: AppColors.textBlue,
|
||||||
|
backgroundColor: AppColors.primary30,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -96,44 +96,46 @@ class _TenderDetailDesktopPageState extends State<TenderDetailDesktopPage> {
|
|||||||
return const Center(child: Text(TenderDetailsStrings.tenderNoData));
|
return const Center(child: Text(TenderDetailsStrings.tenderNoData));
|
||||||
}
|
}
|
||||||
|
|
||||||
return Column(
|
return SafeArea(
|
||||||
children: [
|
child: Column(
|
||||||
const DesktopNavigationWidget(
|
children: [
|
||||||
currentIndex: 1, // Home index
|
const DesktopNavigationWidget(
|
||||||
),
|
currentIndex: 1, // Home index
|
||||||
Expanded(
|
),
|
||||||
child: SingleChildScrollView(
|
Expanded(
|
||||||
child: Center(
|
child: SingleChildScrollView(
|
||||||
child: SizedBox(
|
child: Center(
|
||||||
width: 740,
|
child: SizedBox(
|
||||||
child: Padding(
|
width: 740,
|
||||||
padding: const EdgeInsets.all(32.0),
|
child: Padding(
|
||||||
child: Column(
|
padding: const EdgeInsets.all(32.0),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
const TabletDesktopAppbar(
|
children: [
|
||||||
title: TenderDetailsStrings.tenderDetailTitle,
|
const TabletDesktopAppbar(
|
||||||
),
|
title: TenderDetailsStrings.tenderDetailTitle,
|
||||||
SizedBox(height: 32.0.h()),
|
),
|
||||||
TenderDetailHeader(
|
SizedBox(height: 32.0.h()),
|
||||||
isScreenBig: true,
|
TenderDetailHeader(
|
||||||
detail: detail,
|
isScreenBig: true,
|
||||||
),
|
detail: detail,
|
||||||
SizedBox(height: 32.0.h()),
|
),
|
||||||
TenderDetailCard(detail: detail),
|
SizedBox(height: 32.0.h()),
|
||||||
SizedBox(height: 24.0.h()),
|
TenderDetailCard(detail: detail),
|
||||||
TenderDetailActions(
|
SizedBox(height: 24.0.h()),
|
||||||
isScreenBig: true,
|
TenderDetailActions(
|
||||||
detail: detail,
|
isScreenBig: true,
|
||||||
),
|
detail: detail,
|
||||||
],
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -102,21 +102,23 @@ class _TenderDetailMobilePageState extends State<TenderDetailMobilePage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return SingleChildScrollView(
|
return SafeArea(
|
||||||
child: Padding(
|
child: SingleChildScrollView(
|
||||||
padding: EdgeInsets.symmetric(
|
child: Padding(
|
||||||
horizontal: 16.0.w(),
|
padding: EdgeInsets.symmetric(
|
||||||
vertical: 16.0.h(),
|
horizontal: 16.0.w(),
|
||||||
),
|
vertical: 16.0.h(),
|
||||||
child: Column(
|
),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
TenderDetailHeader(isScreenBig: false, detail: detail),
|
children: [
|
||||||
SizedBox(height: 24.0.h()),
|
TenderDetailHeader(isScreenBig: false, detail: detail),
|
||||||
TenderDetailCard(detail: detail),
|
SizedBox(height: 24.0.h()),
|
||||||
SizedBox(height: 24.0.h()),
|
TenderDetailCard(detail: detail),
|
||||||
TenderDetailActions(isScreenBig: false, detail: detail),
|
SizedBox(height: 24.0.h()),
|
||||||
],
|
TenderDetailActions(isScreenBig: false, detail: detail),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -104,26 +104,28 @@ 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: Center(
|
child: SingleChildScrollView(
|
||||||
child: SizedBox(
|
child: Center(
|
||||||
width: 768,
|
child: SizedBox(
|
||||||
|
width: 768,
|
||||||
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(24.0),
|
padding: const EdgeInsets.all(24.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
const TabletDesktopAppbar(
|
const TabletDesktopAppbar(
|
||||||
title: TenderDetailsStrings.tenderDetailTitle,
|
title: TenderDetailsStrings.tenderDetailTitle,
|
||||||
),
|
),
|
||||||
SizedBox(height: 28.0.h()),
|
SizedBox(height: 28.0.h()),
|
||||||
TenderDetailHeader(isScreenBig: true, detail: detail),
|
TenderDetailHeader(isScreenBig: true, detail: detail),
|
||||||
SizedBox(height: 28.0.h()),
|
SizedBox(height: 28.0.h()),
|
||||||
TenderDetailCard(detail: detail),
|
TenderDetailCard(detail: detail),
|
||||||
SizedBox(height: 24.0.h()),
|
SizedBox(height: 24.0.h()),
|
||||||
TenderDetailActions(isScreenBig: true, detail: detail),
|
TenderDetailActions(isScreenBig: true, detail: detail),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
+47
-45
@@ -23,55 +23,57 @@ class FinalCompletionOfDocumentsScreen extends StatelessWidget {
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Consumer<FinalCompletionOfDocumentsViewModel>(
|
body: Consumer<FinalCompletionOfDocumentsViewModel>(
|
||||||
builder:
|
builder:
|
||||||
(context, viewModel, child) => Column(
|
(context, viewModel, child) => SafeArea(
|
||||||
children: [
|
child: Column(
|
||||||
const DesktopNavigationWidget(currentIndex: 1),
|
children: [
|
||||||
const SizedBox(height: 64.0),
|
const DesktopNavigationWidget(currentIndex: 1),
|
||||||
Expanded(
|
const SizedBox(height: 64.0),
|
||||||
child: SizedBox(
|
Expanded(
|
||||||
width: 740,
|
child: SizedBox(
|
||||||
child: SingleChildScrollView(
|
width: 740,
|
||||||
child: Column(
|
child: SingleChildScrollView(
|
||||||
children: [
|
child: Column(
|
||||||
const TabletDesktopAppbar(
|
children: [
|
||||||
title:
|
const TabletDesktopAppbar(
|
||||||
FinalCompletionOfDocumentsStrings
|
title:
|
||||||
.completionOfDocuments,
|
FinalCompletionOfDocumentsStrings
|
||||||
),
|
.completionOfDocuments,
|
||||||
SizedBox(height: 32.0.h()),
|
),
|
||||||
|
SizedBox(height: 32.0.h()),
|
||||||
|
|
||||||
const SizedBox(height: 32.0),
|
const SizedBox(height: 32.0),
|
||||||
const CommentBox(),
|
const CommentBox(),
|
||||||
const SizedBox(height: 32.0),
|
const SizedBox(height: 32.0),
|
||||||
FormCard(viewModel: viewModel),
|
FormCard(viewModel: viewModel),
|
||||||
const SizedBox(height: 40.0),
|
const SizedBox(height: 40.0),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
BaseButton(
|
BaseButton(
|
||||||
isEnabled: true,
|
isEnabled: true,
|
||||||
onPressed: () {},
|
onPressed: () {},
|
||||||
width: 176,
|
width: 176,
|
||||||
backgroundColor: AppColors.primary10,
|
backgroundColor: AppColors.primary10,
|
||||||
textColor: AppColors.mainBlue,
|
textColor: AppColors.mainBlue,
|
||||||
text: FinalCompletionOfDocumentsStrings.back,
|
text: FinalCompletionOfDocumentsStrings.back,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 16.0),
|
const SizedBox(width: 16.0),
|
||||||
BaseButton(
|
BaseButton(
|
||||||
isEnabled: true,
|
isEnabled: true,
|
||||||
onPressed: () {},
|
onPressed: () {},
|
||||||
width: 176,
|
width: 176,
|
||||||
text: FinalCompletionOfDocumentsStrings.next,
|
text: FinalCompletionOfDocumentsStrings.next,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 35.0),
|
const SizedBox(height: 35.0),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -39,26 +39,28 @@ 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: SizedBox(
|
child: SingleChildScrollView(
|
||||||
width: 780,
|
child: SizedBox(
|
||||||
child: Column(
|
width: 780,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
const SizedBox(height: 55),
|
children: [
|
||||||
// SizedBox(width: 780, child: NotificationCard()),
|
const SizedBox(height: 55),
|
||||||
const SizedBox(height: 40.0),
|
// SizedBox(width: 780, child: NotificationCard()),
|
||||||
_progressBarsRow(homeViewModel),
|
const SizedBox(height: 40.0),
|
||||||
SizedBox(height: 32.0.h()),
|
_progressBarsRow(homeViewModel),
|
||||||
Padding(
|
SizedBox(height: 32.0.h()),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 15.0.w()),
|
Padding(
|
||||||
child: _firstTenderCardsRow(context, homeViewModel),
|
padding: EdgeInsets.symmetric(horizontal: 15.0.w()),
|
||||||
),
|
child: _firstTenderCardsRow(context, homeViewModel),
|
||||||
SizedBox(height: 32.0.h()),
|
),
|
||||||
_yourTenderText(homeViewModel),
|
SizedBox(height: 32.0.h()),
|
||||||
SizedBox(height: 8.0.h()),
|
_yourTenderText(homeViewModel),
|
||||||
_bottomListView(homeViewModel),
|
SizedBox(height: 8.0.h()),
|
||||||
],
|
_bottomListView(homeViewModel),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -33,25 +33,27 @@ 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: Column(
|
child: SingleChildScrollView(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
// SizedBox(height: 18.0.h()),
|
children: [
|
||||||
// NotificationCard(),
|
// SizedBox(height: 18.0.h()),
|
||||||
SizedBox(height: 32.0.h()),
|
// NotificationCard(),
|
||||||
_progressBarsRow(homeViewModel),
|
SizedBox(height: 32.0.h()),
|
||||||
SizedBox(height: 32.0.h()),
|
_progressBarsRow(homeViewModel),
|
||||||
_firstTenderCardsRow(
|
SizedBox(height: 32.0.h()),
|
||||||
context,
|
_firstTenderCardsRow(
|
||||||
homeViewModel.tenderApprovalsStateResponse!,
|
context,
|
||||||
),
|
homeViewModel.tenderApprovalsStateResponse!,
|
||||||
SizedBox(height: 8.0.h()),
|
),
|
||||||
_secondTenderCardsRow(homeViewModel, context),
|
SizedBox(height: 8.0.h()),
|
||||||
SizedBox(height: 40.0.h()),
|
_secondTenderCardsRow(homeViewModel, context),
|
||||||
_yourTenderText(homeViewModel),
|
SizedBox(height: 40.0.h()),
|
||||||
_bottomListView(homeViewModel),
|
_yourTenderText(homeViewModel),
|
||||||
],
|
_bottomListView(homeViewModel),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,24 +50,26 @@ class TabletHomePage extends StatelessWidget {
|
|||||||
24.0.w(),
|
24.0.w(),
|
||||||
24.0.h(),
|
24.0.h(),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: SafeArea(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
// NotificationCard(),
|
children: [
|
||||||
SizedBox(height: 40.0.h()),
|
// NotificationCard(),
|
||||||
_progressBarsRow(homeViewModel),
|
SizedBox(height: 40.0.h()),
|
||||||
SizedBox(height: 32.0.h()),
|
_progressBarsRow(homeViewModel),
|
||||||
_firstTenderCardsRow(
|
SizedBox(height: 32.0.h()),
|
||||||
context,
|
_firstTenderCardsRow(
|
||||||
homeViewModel.tenderApprovalsStateResponse!,
|
context,
|
||||||
),
|
homeViewModel.tenderApprovalsStateResponse!,
|
||||||
SizedBox(height: 8.0.h()),
|
),
|
||||||
_secondTenderCardsRow(homeViewModel, context),
|
SizedBox(height: 8.0.h()),
|
||||||
SizedBox(height: 32.0.h()),
|
_secondTenderCardsRow(homeViewModel, context),
|
||||||
_yourTenderText(homeViewModel),
|
SizedBox(height: 32.0.h()),
|
||||||
SizedBox(height: 8.0.h()),
|
_yourTenderText(homeViewModel),
|
||||||
_bottomListView(homeViewModel),
|
SizedBox(height: 8.0.h()),
|
||||||
],
|
_bottomListView(homeViewModel),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -59,71 +59,73 @@ 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(
|
||||||
children: [
|
child: Column(
|
||||||
const DesktopNavigationWidget(currentIndex: 1, haveFilter: true),
|
children: [
|
||||||
const SizedBox(height: 40),
|
const DesktopNavigationWidget(currentIndex: 1, haveFilter: true),
|
||||||
SizedBox(
|
const SizedBox(height: 40),
|
||||||
width: 740,
|
SizedBox(
|
||||||
child: TabletDesktopAppbar(
|
|
||||||
title: LikedTendersStrings.likedTenders,
|
|
||||||
haveFilter: true,
|
|
||||||
onFilterPressed: () {
|
|
||||||
scaffoldKey.currentState?.openEndDrawer();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 24),
|
|
||||||
Expanded(
|
|
||||||
child: SizedBox(
|
|
||||||
width: 740,
|
width: 740,
|
||||||
child: Consumer<LikedTendersViewModel>(
|
child: TabletDesktopAppbar(
|
||||||
builder: (context, viewModel, child) {
|
title: LikedTendersStrings.likedTenders,
|
||||||
if (viewModel.isLoading &&
|
haveFilter: true,
|
||||||
(viewModel.data?.data?.feedback ?? []).isEmpty) {
|
onFilterPressed: () {
|
||||||
return const Center(
|
scaffoldKey.currentState?.openEndDrawer();
|
||||||
child: CircularProgressIndicator(
|
|
||||||
color: AppColors.secondary50,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
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 currentPage = viewModel.currentPage;
|
|
||||||
final totalPages = viewModel.data?.data?.meta?.pages ?? 1;
|
|
||||||
|
|
||||||
return Column(
|
|
||||||
children: [
|
|
||||||
_likedTendersList(feedback, viewModel),
|
|
||||||
|
|
||||||
SizedBox(height: 10.0.h()),
|
|
||||||
|
|
||||||
_likedTenersListPageControll(
|
|
||||||
context,
|
|
||||||
totalPages,
|
|
||||||
viewModel,
|
|
||||||
currentPage,
|
|
||||||
),
|
|
||||||
|
|
||||||
SizedBox(height: 30.0.h()),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 24),
|
||||||
],
|
Expanded(
|
||||||
|
child: SizedBox(
|
||||||
|
width: 740,
|
||||||
|
child: Consumer<LikedTendersViewModel>(
|
||||||
|
builder: (context, viewModel, child) {
|
||||||
|
if (viewModel.isLoading &&
|
||||||
|
(viewModel.data?.data?.feedback ?? []).isEmpty) {
|
||||||
|
return const Center(
|
||||||
|
child: CircularProgressIndicator(
|
||||||
|
color: AppColors.secondary50,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
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 currentPage = viewModel.currentPage;
|
||||||
|
final totalPages = viewModel.data?.data?.meta?.pages ?? 1;
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
_likedTendersList(feedback, viewModel),
|
||||||
|
|
||||||
|
SizedBox(height: 10.0.h()),
|
||||||
|
|
||||||
|
_likedTenersListPageControll(
|
||||||
|
context,
|
||||||
|
totalPages,
|
||||||
|
viewModel,
|
||||||
|
currentPage,
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(height: 30.0.h()),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -156,91 +156,93 @@ class _LikedTendersMobilePageState extends State<LikedTendersMobilePage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
body: Column(
|
body: SafeArea(
|
||||||
children: [
|
child: Column(
|
||||||
Expanded(
|
children: [
|
||||||
child: Consumer<LikedTendersViewModel>(
|
Expanded(
|
||||||
builder: (context, viewModel, child) {
|
child: Consumer<LikedTendersViewModel>(
|
||||||
if (viewModel.isLoading &&
|
builder: (context, viewModel, child) {
|
||||||
(viewModel.data?.data?.feedback ?? []).isEmpty) {
|
if (viewModel.isLoading &&
|
||||||
return const Center(
|
(viewModel.data?.data?.feedback ?? []).isEmpty) {
|
||||||
child: CircularProgressIndicator(
|
return const Center(
|
||||||
color: AppColors.secondary50,
|
child: CircularProgressIndicator(
|
||||||
|
color: AppColors.secondary50,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
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(
|
||||||
|
horizontal: 24.0.w(),
|
||||||
|
vertical: 15.0.h(),
|
||||||
),
|
),
|
||||||
);
|
itemCount: itemCount,
|
||||||
}
|
itemBuilder: (context, index) {
|
||||||
|
if (index < feedback.length) {
|
||||||
|
final item = feedback[index];
|
||||||
|
|
||||||
if (viewModel.errorMessage != null) {
|
return Padding(
|
||||||
return Center(child: Text(viewModel.errorMessage!));
|
padding: EdgeInsets.only(bottom: 20.0.h()),
|
||||||
}
|
child: Dismissible(
|
||||||
|
key: ValueKey(item.tenderId ?? index),
|
||||||
final feedback = viewModel.data?.data?.feedback ?? [];
|
direction: DismissDirection.endToStart,
|
||||||
|
background: Container(
|
||||||
if (feedback.isEmpty) {
|
alignment: Alignment.centerRight,
|
||||||
return const Center(
|
padding: EdgeInsets.symmetric(
|
||||||
child: Text(LikedTendersStrings.noLikedTenders),
|
horizontal: 20.0.w(),
|
||||||
);
|
),
|
||||||
}
|
child: SvgPicture.asset(
|
||||||
|
AssetsManager.trash,
|
||||||
final itemCount =
|
width: 32.0.w(),
|
||||||
feedback.length + (viewModel.isLoadingMore ? 1 : 0);
|
height: 32.0.h(),
|
||||||
|
),
|
||||||
return ListView.builder(
|
|
||||||
controller: _scrollController,
|
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
horizontal: 24.0.w(),
|
|
||||||
vertical: 15.0.h(),
|
|
||||||
),
|
|
||||||
itemCount: itemCount,
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
if (index < feedback.length) {
|
|
||||||
final item = feedback[index];
|
|
||||||
|
|
||||||
return Padding(
|
|
||||||
padding: EdgeInsets.only(bottom: 20.0.h()),
|
|
||||||
child: Dismissible(
|
|
||||||
key: ValueKey(item.tenderId ?? index),
|
|
||||||
direction: DismissDirection.endToStart,
|
|
||||||
background: Container(
|
|
||||||
alignment: Alignment.centerRight,
|
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
horizontal: 20.0.w(),
|
|
||||||
),
|
),
|
||||||
child: SvgPicture.asset(
|
onDismissed: (_) {
|
||||||
AssetsManager.trash,
|
if (item.tenderId != null) {
|
||||||
width: 32.0.w(),
|
viewModel.removeTenderById(item.tenderId!);
|
||||||
height: 32.0.h(),
|
}
|
||||||
|
},
|
||||||
|
child: LikedListItem(tender: item.tender!),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return Padding(
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 20.0.h()),
|
||||||
|
child: Center(
|
||||||
|
child: SizedBox(
|
||||||
|
width: 24.0.w(),
|
||||||
|
height: 24.0.h(),
|
||||||
|
child: const CircularProgressIndicator(
|
||||||
|
color: AppColors.secondary50,
|
||||||
|
strokeWidth: 2,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onDismissed: (_) {
|
);
|
||||||
if (item.tenderId != null) {
|
}
|
||||||
viewModel.removeTenderById(item.tenderId!);
|
},
|
||||||
}
|
);
|
||||||
},
|
},
|
||||||
child: LikedListItem(tender: item.tender!),
|
),
|
||||||
),
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return Padding(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 20.0.h()),
|
|
||||||
child: Center(
|
|
||||||
child: SizedBox(
|
|
||||||
width: 24.0.w(),
|
|
||||||
height: 24.0.h(),
|
|
||||||
child: const CircularProgressIndicator(
|
|
||||||
color: AppColors.secondary50,
|
|
||||||
strokeWidth: 2,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -63,79 +63,81 @@ 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: SizedBox(
|
child: Center(
|
||||||
width: 720,
|
child: SizedBox(
|
||||||
child: Column(
|
width: 720,
|
||||||
children: [
|
child: Column(
|
||||||
TabletDesktopAppbar(
|
children: [
|
||||||
title: LikedTendersStrings.likedTenders,
|
TabletDesktopAppbar(
|
||||||
haveFilter: true,
|
title: LikedTendersStrings.likedTenders,
|
||||||
onFilterPressed: () {
|
haveFilter: true,
|
||||||
showModalBottomSheet(
|
onFilterPressed: () {
|
||||||
context: context,
|
showModalBottomSheet(
|
||||||
isScrollControlled: true,
|
context: context,
|
||||||
backgroundColor: AppColors.backgroundColor,
|
isScrollControlled: true,
|
||||||
shape: const RoundedRectangleBorder(
|
backgroundColor: AppColors.backgroundColor,
|
||||||
borderRadius: BorderRadius.vertical(
|
shape: const RoundedRectangleBorder(
|
||||||
top: Radius.circular(20),
|
borderRadius: BorderRadius.vertical(
|
||||||
|
top: Radius.circular(20),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
constraints: BoxConstraints(
|
||||||
constraints: BoxConstraints(
|
maxWidth: MediaQuery.sizeOf(context).width,
|
||||||
maxWidth: MediaQuery.sizeOf(context).width,
|
maxHeight: MediaQuery.sizeOf(context).height,
|
||||||
maxHeight: MediaQuery.sizeOf(context).height,
|
),
|
||||||
),
|
builder: (context) => const LikeFiltersBottomSheet(),
|
||||||
builder: (context) => const LikeFiltersBottomSheet(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Consumer<LikedTendersViewModel>(
|
|
||||||
builder: (context, viewModel, child) {
|
|
||||||
if (viewModel.isLoading &&
|
|
||||||
(viewModel.data?.data?.feedback ?? []).isEmpty) {
|
|
||||||
return const Center(
|
|
||||||
child: CircularProgressIndicator(
|
|
||||||
color: AppColors.secondary50,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
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 currentPage = viewModel.currentPage;
|
|
||||||
final totalPages = viewModel.data?.data?.meta?.pages ?? 1;
|
|
||||||
|
|
||||||
return Column(
|
|
||||||
children: [
|
|
||||||
_likedTendersList(feedback, viewModel),
|
|
||||||
|
|
||||||
SizedBox(height: 10.0.h()),
|
|
||||||
|
|
||||||
_likeTendersListPagesControll(
|
|
||||||
context,
|
|
||||||
totalPages,
|
|
||||||
viewModel,
|
|
||||||
currentPage,
|
|
||||||
),
|
|
||||||
|
|
||||||
SizedBox(height: 30.0.h()),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
Expanded(
|
||||||
],
|
child: Consumer<LikedTendersViewModel>(
|
||||||
|
builder: (context, viewModel, child) {
|
||||||
|
if (viewModel.isLoading &&
|
||||||
|
(viewModel.data?.data?.feedback ?? []).isEmpty) {
|
||||||
|
return const Center(
|
||||||
|
child: CircularProgressIndicator(
|
||||||
|
color: AppColors.secondary50,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
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 currentPage = viewModel.currentPage;
|
||||||
|
final totalPages = viewModel.data?.data?.meta?.pages ?? 1;
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
_likedTendersList(feedback, viewModel),
|
||||||
|
|
||||||
|
SizedBox(height: 10.0.h()),
|
||||||
|
|
||||||
|
_likeTendersListPagesControll(
|
||||||
|
context,
|
||||||
|
totalPages,
|
||||||
|
viewModel,
|
||||||
|
currentPage,
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(height: 30.0.h()),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -64,85 +64,87 @@ class _DesktopProfilePageState extends State<DesktopProfilePage> {
|
|||||||
return const Center(child: Text(CommonStrings.noData));
|
return const Center(child: Text(CommonStrings.noData));
|
||||||
}
|
}
|
||||||
|
|
||||||
return Column(
|
return SafeArea(
|
||||||
children: [
|
child: Column(
|
||||||
const DesktopNavigationWidget(
|
children: [
|
||||||
currentIndex: 4, // Tenders index
|
const DesktopNavigationWidget(
|
||||||
),
|
currentIndex: 4, // Tenders index
|
||||||
SizedBox(
|
),
|
||||||
width: 740,
|
SizedBox(
|
||||||
child: Column(
|
width: 740,
|
||||||
children: [
|
child: Column(
|
||||||
SizedBox(height: 36.0.h()),
|
children: [
|
||||||
TitleDescription(
|
SizedBox(height: 36.0.h()),
|
||||||
title: ProfileStrings.companyName,
|
TitleDescription(
|
||||||
description: viewModel.companyProfileData!.name!,
|
title: ProfileStrings.companyName,
|
||||||
),
|
description: viewModel.companyProfileData!.name!,
|
||||||
TitleDescription(
|
),
|
||||||
title: ProfileStrings.nationalId,
|
TitleDescription(
|
||||||
description: viewModel.companyProfileData!.id!,
|
title: ProfileStrings.nationalId,
|
||||||
),
|
description: viewModel.companyProfileData!.id!,
|
||||||
TitleDescription(
|
),
|
||||||
title: ProfileStrings.registrationNumber,
|
TitleDescription(
|
||||||
description:
|
title: ProfileStrings.registrationNumber,
|
||||||
viewModel.companyProfileData!.registrationNumber!,
|
description:
|
||||||
),
|
viewModel.companyProfileData!.registrationNumber!,
|
||||||
const TitleDescription(
|
),
|
||||||
title: ProfileStrings.businessType,
|
const TitleDescription(
|
||||||
description: '-',
|
title: ProfileStrings.businessType,
|
||||||
),
|
description: '-',
|
||||||
TitleDescription(
|
),
|
||||||
title: ProfileStrings.founded,
|
TitleDescription(
|
||||||
description:
|
title: ProfileStrings.founded,
|
||||||
viewModel.companyProfileData!.foundedYear!.toString(),
|
description:
|
||||||
),
|
viewModel.companyProfileData!.foundedYear!.toString(),
|
||||||
SizedBox(height: 24.0.h()),
|
),
|
||||||
// Theme Toggle
|
SizedBox(height: 24.0.h()),
|
||||||
Align(
|
// Theme Toggle
|
||||||
alignment: AlignmentDirectional.centerStart,
|
Align(
|
||||||
child: Text(
|
alignment: AlignmentDirectional.centerStart,
|
||||||
ProfileStrings.settings,
|
child: Text(
|
||||||
style: TextStyle(
|
ProfileStrings.settings,
|
||||||
fontSize: 20.0.sp(),
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.w600,
|
fontSize: 20.0.sp(),
|
||||||
color: AppColors.grey70,
|
fontWeight: FontWeight.w600,
|
||||||
|
color: AppColors.grey70,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
SizedBox(height: 36.0.h()),
|
||||||
SizedBox(height: 36.0.h()),
|
_themeChangeRow(),
|
||||||
_themeChangeRow(),
|
SizedBox(height: 24.0.h()),
|
||||||
SizedBox(height: 24.0.h()),
|
Divider(color: AppColors.dividerColor, thickness: 1),
|
||||||
Divider(color: AppColors.dividerColor, thickness: 1),
|
SizedBox(height: 24.0.h()),
|
||||||
SizedBox(height: 24.0.h()),
|
// Spacer(),
|
||||||
// Spacer(),
|
Align(
|
||||||
Align(
|
alignment: AlignmentDirectional.centerEnd,
|
||||||
alignment: AlignmentDirectional.centerEnd,
|
child: InkWell(
|
||||||
child: InkWell(
|
onTap: () => viewModel.logout(),
|
||||||
onTap: () => viewModel.logout(),
|
borderRadius: BorderRadius.circular(100),
|
||||||
borderRadius: BorderRadius.circular(100),
|
child: Container(
|
||||||
child: Container(
|
width: 156,
|
||||||
width: 156,
|
height: 56.0.h(),
|
||||||
height: 56.0.h(),
|
decoration: BoxDecoration(
|
||||||
decoration: BoxDecoration(
|
color: AppColors.primary20,
|
||||||
color: AppColors.primary20,
|
borderRadius: BorderRadius.circular(100),
|
||||||
borderRadius: BorderRadius.circular(100),
|
),
|
||||||
),
|
alignment: Alignment.center,
|
||||||
alignment: Alignment.center,
|
child: Text(
|
||||||
child: Text(
|
ProfileStrings.logout,
|
||||||
ProfileStrings.logout,
|
style: TextStyle(
|
||||||
style: TextStyle(
|
fontSize: 14.0.sp(),
|
||||||
fontSize: 14.0.sp(),
|
fontWeight: FontWeight.w500,
|
||||||
fontWeight: FontWeight.w500,
|
color: AppColors.primaryColor,
|
||||||
color: AppColors.primaryColor,
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -66,76 +66,78 @@ class _MobileProfilePageState extends State<MobileProfilePage> {
|
|||||||
return const Center(child: Text(CommonStrings.noData));
|
return const Center(child: Text(CommonStrings.noData));
|
||||||
}
|
}
|
||||||
|
|
||||||
return Padding(
|
return SafeArea(
|
||||||
padding: EdgeInsets.symmetric(
|
child: Padding(
|
||||||
horizontal: 24.0.w(),
|
padding: EdgeInsets.symmetric(
|
||||||
vertical: 16.0.h(),
|
horizontal: 24.0.w(),
|
||||||
),
|
vertical: 16.0.h(),
|
||||||
child: Column(
|
),
|
||||||
children: [
|
child: Column(
|
||||||
SizedBox(height: 36.0.h()),
|
children: [
|
||||||
TitleDescription(
|
SizedBox(height: 36.0.h()),
|
||||||
title: ProfileStrings.companyName,
|
TitleDescription(
|
||||||
description: viewModel.companyProfileData!.name!,
|
title: ProfileStrings.companyName,
|
||||||
),
|
description: viewModel.companyProfileData!.name!,
|
||||||
TitleDescription(
|
|
||||||
title: ProfileStrings.nationalId,
|
|
||||||
description: viewModel.companyProfileData!.id!,
|
|
||||||
),
|
|
||||||
TitleDescription(
|
|
||||||
title: ProfileStrings.registrationNumber,
|
|
||||||
description:
|
|
||||||
viewModel.companyProfileData!.registrationNumber!,
|
|
||||||
),
|
|
||||||
const TitleDescription(
|
|
||||||
title: ProfileStrings.businessType,
|
|
||||||
description: '-',
|
|
||||||
),
|
|
||||||
TitleDescription(
|
|
||||||
title: ProfileStrings.founded,
|
|
||||||
description:
|
|
||||||
viewModel.companyProfileData!.foundedYear!.toString(),
|
|
||||||
),
|
|
||||||
SizedBox(height: 32.0.h()),
|
|
||||||
Align(
|
|
||||||
alignment: AlignmentDirectional.centerStart,
|
|
||||||
child: Text(
|
|
||||||
ProfileStrings.settings,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 20.0.sp(),
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
color: AppColors.grey70,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
TitleDescription(
|
||||||
SizedBox(height: 36.0.h()),
|
title: ProfileStrings.nationalId,
|
||||||
_themeChangeRow(),
|
description: viewModel.companyProfileData!.id!,
|
||||||
SizedBox(height: 24.0.h()),
|
),
|
||||||
Divider(color: AppColors.dividerColor, thickness: 1),
|
TitleDescription(
|
||||||
SizedBox(height: 24.0.h()),
|
title: ProfileStrings.registrationNumber,
|
||||||
const Spacer(),
|
description:
|
||||||
InkWell(
|
viewModel.companyProfileData!.registrationNumber!,
|
||||||
onTap: () => viewModel.logout(),
|
),
|
||||||
borderRadius: BorderRadius.circular(100),
|
const TitleDescription(
|
||||||
child: Container(
|
title: ProfileStrings.businessType,
|
||||||
width: double.infinity,
|
description: '-',
|
||||||
height: 56.0.h(),
|
),
|
||||||
decoration: BoxDecoration(
|
TitleDescription(
|
||||||
color: AppColors.primary20,
|
title: ProfileStrings.founded,
|
||||||
borderRadius: BorderRadius.circular(100),
|
description:
|
||||||
),
|
viewModel.companyProfileData!.foundedYear!.toString(),
|
||||||
alignment: Alignment.center,
|
),
|
||||||
|
SizedBox(height: 32.0.h()),
|
||||||
|
Align(
|
||||||
|
alignment: AlignmentDirectional.centerStart,
|
||||||
child: Text(
|
child: Text(
|
||||||
ProfileStrings.logout,
|
ProfileStrings.settings,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14.0.sp(),
|
fontSize: 20.0.sp(),
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w600,
|
||||||
color: AppColors.primaryColor,
|
color: AppColors.grey70,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
SizedBox(height: 36.0.h()),
|
||||||
],
|
_themeChangeRow(),
|
||||||
|
SizedBox(height: 24.0.h()),
|
||||||
|
Divider(color: AppColors.dividerColor, thickness: 1),
|
||||||
|
SizedBox(height: 24.0.h()),
|
||||||
|
const Spacer(),
|
||||||
|
InkWell(
|
||||||
|
onTap: () => viewModel.logout(),
|
||||||
|
borderRadius: BorderRadius.circular(100),
|
||||||
|
child: Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 56.0.h(),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColors.primary20,
|
||||||
|
borderRadius: BorderRadius.circular(100),
|
||||||
|
),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text(
|
||||||
|
ProfileStrings.logout,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 14.0.sp(),
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
color: AppColors.primaryColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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(),
|
||||||
|
|||||||
@@ -41,10 +41,12 @@ class _DesktopSplashPageState extends State<DesktopSplashPage> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Center(
|
body: SafeArea(
|
||||||
child: Padding(
|
child: Center(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 100),
|
child: Padding(
|
||||||
child: Image.asset(AssetsManager.logoBigPng),
|
padding: const EdgeInsets.symmetric(horizontal: 100),
|
||||||
|
child: Image.asset(AssetsManager.logoBigPng),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -53,10 +53,12 @@ class _MobileSplashPageState extends State<MobileSplashPage> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Center(
|
body: SafeArea(
|
||||||
child: Padding(
|
child: Center(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
child: Padding(
|
||||||
child: Image.asset(AssetsManager.logoBigPng, fit: BoxFit.cover),
|
padding: EdgeInsets.symmetric(horizontal: 24.0.w()),
|
||||||
|
child: Image.asset(AssetsManager.logoBigPng, fit: BoxFit.cover),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -41,10 +41,12 @@ class _TabletSplashPageState extends State<TabletSplashPage> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Center(
|
body: SafeArea(
|
||||||
child: Padding(
|
child: Center(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 40),
|
child: Padding(
|
||||||
child: Image.asset(AssetsManager.logoBigPng),
|
padding: const EdgeInsets.symmetric(horizontal: 40),
|
||||||
|
child: Image.asset(AssetsManager.logoBigPng),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -51,58 +51,60 @@ 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(
|
||||||
children: [
|
child: Column(
|
||||||
const DesktopNavigationWidget(currentIndex: 1),
|
children: [
|
||||||
SizedBox(height: 48.0.h()),
|
const DesktopNavigationWidget(currentIndex: 1),
|
||||||
const _SearchBox(),
|
SizedBox(height: 48.0.h()),
|
||||||
const _ActionButtons(),
|
const _SearchBox(),
|
||||||
Expanded(
|
const _ActionButtons(),
|
||||||
child: Consumer<TendersViewModel>(
|
Expanded(
|
||||||
builder: (context, vm, child) {
|
child: Consumer<TendersViewModel>(
|
||||||
if (vm.isLoading) {
|
builder: (context, vm, child) {
|
||||||
return const Center(
|
if (vm.isLoading) {
|
||||||
child: CircularProgressIndicator(
|
return const Center(
|
||||||
color: AppColors.jellyBean,
|
child: CircularProgressIndicator(
|
||||||
),
|
color: AppColors.jellyBean,
|
||||||
);
|
),
|
||||||
}
|
);
|
||||||
if (vm.errorMessage != null) {
|
}
|
||||||
return Center(child: Text(vm.errorMessage!));
|
if (vm.errorMessage != null) {
|
||||||
}
|
return Center(child: Text(vm.errorMessage!));
|
||||||
final tenders = vm.tendersResponse?.data?.tenders ?? [];
|
}
|
||||||
if (tenders.isEmpty) {
|
final tenders = vm.tendersResponse?.data?.tenders ?? [];
|
||||||
return const Center(child: Text(CommonStrings.noData));
|
if (tenders.isEmpty) {
|
||||||
}
|
return const Center(child: Text(CommonStrings.noData));
|
||||||
|
}
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 740,
|
width: 740,
|
||||||
height: 800,
|
height: 800,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: 4.0.h()),
|
padding: EdgeInsets.symmetric(vertical: 4.0.h()),
|
||||||
child: MainTendersSlider(
|
child: MainTendersSlider(
|
||||||
tenders: tenders,
|
tenders: tenders,
|
||||||
isDesktop: true,
|
isDesktop: true,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
_DesktopPagination(
|
||||||
_DesktopPagination(
|
totalPages: vm.totalPages,
|
||||||
totalPages: vm.totalPages,
|
currentPage: vm.currentPage,
|
||||||
currentPage: vm.currentPage,
|
onPageSelected: vm.jumpToPage,
|
||||||
onPageSelected: vm.jumpToPage,
|
),
|
||||||
),
|
],
|
||||||
],
|
);
|
||||||
);
|
},
|
||||||
},
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,10 +60,12 @@ class _MobileTendersPageState extends State<MobileTendersPage> {
|
|||||||
return const Center(child: Text(CommonStrings.noData));
|
return const Center(child: Text(CommonStrings.noData));
|
||||||
}
|
}
|
||||||
|
|
||||||
return Padding(
|
return SafeArea(
|
||||||
padding: EdgeInsets.symmetric(vertical: 18.0.h()),
|
child: Padding(
|
||||||
child: MainTendersSlider(
|
padding: EdgeInsets.symmetric(vertical: 18.0.h()),
|
||||||
tenders: viewModel.tendersResponse?.data?.tenders ?? [],
|
child: MainTendersSlider(
|
||||||
|
tenders: viewModel.tendersResponse?.data?.tenders ?? [],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -51,13 +51,15 @@ class _TabletTendersPageState extends State<TabletTendersPage> {
|
|||||||
}
|
}
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Padding(
|
child: SafeArea(
|
||||||
padding: EdgeInsetsDirectional.only(
|
child: Padding(
|
||||||
end: 24.0.w(),
|
padding: EdgeInsetsDirectional.only(
|
||||||
top: 128.0.h(),
|
end: 24.0.w(),
|
||||||
),
|
top: 128.0.h(),
|
||||||
child: MainTendersSlider(
|
),
|
||||||
tenders: viewModel.tendersResponse?.data?.tenders ?? [],
|
child: MainTendersSlider(
|
||||||
|
tenders: viewModel.tendersResponse?.data?.tenders ?? [],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -39,88 +39,90 @@ 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(
|
||||||
children: [
|
child: Column(
|
||||||
const DesktopNavigationWidget(currentIndex: 1), // Tenders index
|
children: [
|
||||||
Expanded(
|
const DesktopNavigationWidget(currentIndex: 1), // Tenders index
|
||||||
child: SizedBox(
|
Expanded(
|
||||||
width: 740,
|
child: SizedBox(
|
||||||
child: Column(
|
width: 740,
|
||||||
children: [
|
child: Column(
|
||||||
SizedBox(height: 64.0.h()),
|
children: [
|
||||||
const TabletDesktopAppbar(
|
SizedBox(height: 64.0.h()),
|
||||||
title: YourTendersStrings.yourTenders,
|
const TabletDesktopAppbar(
|
||||||
),
|
title: YourTendersStrings.yourTenders,
|
||||||
SizedBox(height: 20.0.h()),
|
|
||||||
const FilterButton(platformType: PlatformType.tabletDesktop),
|
|
||||||
|
|
||||||
Expanded(
|
|
||||||
child: Consumer<YourTendersViewModel>(
|
|
||||||
builder: (context, viewModel, child) {
|
|
||||||
if (viewModel.isLoading &&
|
|
||||||
(viewModel.data == null &&
|
|
||||||
viewModel.likedTendersData == null)) {
|
|
||||||
return const Center(
|
|
||||||
child: CircularProgressIndicator(
|
|
||||||
color: AppColors.secondary50,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (viewModel.errorMessage != null) {
|
|
||||||
return Center(child: Text(viewModel.errorMessage!));
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget content;
|
|
||||||
|
|
||||||
if (viewModel.selectedStatus ==
|
|
||||||
YourTendersStrings.likeTenders &&
|
|
||||||
viewModel.likedTendersData != null) {
|
|
||||||
content = LikedDislikedTendersList(
|
|
||||||
data: viewModel.likedTendersData!,
|
|
||||||
status: TenderFeedback.liked.value,
|
|
||||||
isDesktop: true,
|
|
||||||
isMobile: false,
|
|
||||||
);
|
|
||||||
} else if (viewModel.selectedStatus ==
|
|
||||||
YourTendersStrings.dislikeTenders &&
|
|
||||||
viewModel.likedTendersData != null) {
|
|
||||||
content = LikedDislikedTendersList(
|
|
||||||
data: viewModel.likedTendersData!,
|
|
||||||
status: TenderFeedback.disliked.value,
|
|
||||||
isDesktop: true,
|
|
||||||
isMobile: false,
|
|
||||||
);
|
|
||||||
} else if (viewModel.data != null) {
|
|
||||||
content = TendersSubmitted(
|
|
||||||
approvedTenders: viewModel.data!,
|
|
||||||
isDesktop: true,
|
|
||||||
isMobile: false,
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
content = const Center(
|
|
||||||
child: Text(YourTendersStrings.noTenders),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Column(
|
|
||||||
children: [
|
|
||||||
Expanded(child: content),
|
|
||||||
SizedBox(height: 10.0.h()),
|
|
||||||
|
|
||||||
_listPagesControll(context, viewModel),
|
|
||||||
|
|
||||||
SizedBox(height: 30.0.h()),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
),
|
SizedBox(height: 20.0.h()),
|
||||||
],
|
const FilterButton(platformType: PlatformType.tabletDesktop),
|
||||||
|
|
||||||
|
Expanded(
|
||||||
|
child: Consumer<YourTendersViewModel>(
|
||||||
|
builder: (context, viewModel, child) {
|
||||||
|
if (viewModel.isLoading &&
|
||||||
|
(viewModel.data == null &&
|
||||||
|
viewModel.likedTendersData == null)) {
|
||||||
|
return const Center(
|
||||||
|
child: CircularProgressIndicator(
|
||||||
|
color: AppColors.secondary50,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (viewModel.errorMessage != null) {
|
||||||
|
return Center(child: Text(viewModel.errorMessage!));
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget content;
|
||||||
|
|
||||||
|
if (viewModel.selectedStatus ==
|
||||||
|
YourTendersStrings.likeTenders &&
|
||||||
|
viewModel.likedTendersData != null) {
|
||||||
|
content = LikedDislikedTendersList(
|
||||||
|
data: viewModel.likedTendersData!,
|
||||||
|
status: TenderFeedback.liked.value,
|
||||||
|
isDesktop: true,
|
||||||
|
isMobile: false,
|
||||||
|
);
|
||||||
|
} else if (viewModel.selectedStatus ==
|
||||||
|
YourTendersStrings.dislikeTenders &&
|
||||||
|
viewModel.likedTendersData != null) {
|
||||||
|
content = LikedDislikedTendersList(
|
||||||
|
data: viewModel.likedTendersData!,
|
||||||
|
status: TenderFeedback.disliked.value,
|
||||||
|
isDesktop: true,
|
||||||
|
isMobile: false,
|
||||||
|
);
|
||||||
|
} else if (viewModel.data != null) {
|
||||||
|
content = TendersSubmitted(
|
||||||
|
approvedTenders: viewModel.data!,
|
||||||
|
isDesktop: true,
|
||||||
|
isMobile: false,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
content = const Center(
|
||||||
|
child: Text(YourTendersStrings.noTenders),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Expanded(child: content),
|
||||||
|
SizedBox(height: 10.0.h()),
|
||||||
|
|
||||||
|
_listPagesControll(context, viewModel),
|
||||||
|
|
||||||
|
SizedBox(height: 30.0.h()),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,71 +38,73 @@ 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(
|
||||||
children: [
|
child: Column(
|
||||||
const FilterButton(platformType: PlatformType.mobile),
|
children: [
|
||||||
Expanded(
|
const FilterButton(platformType: PlatformType.mobile),
|
||||||
child: Consumer<YourTendersViewModel>(
|
Expanded(
|
||||||
builder: (context, viewModel, child) {
|
child: Consumer<YourTendersViewModel>(
|
||||||
if (viewModel.isLoading &&
|
builder: (context, viewModel, child) {
|
||||||
(viewModel.data?.data?.tenders ?? []).isEmpty &&
|
if (viewModel.isLoading &&
|
||||||
(viewModel.likedTendersData?.data?.feedback ?? [])
|
(viewModel.data?.data?.tenders ?? []).isEmpty &&
|
||||||
.isEmpty) {
|
(viewModel.likedTendersData?.data?.feedback ?? [])
|
||||||
return const Center(
|
.isEmpty) {
|
||||||
child: CircularProgressIndicator(
|
return const Center(
|
||||||
color: AppColors.secondary50,
|
child: CircularProgressIndicator(
|
||||||
),
|
color: AppColors.secondary50,
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (viewModel.errorMessage != null) {
|
|
||||||
return Center(child: Text(viewModel.errorMessage!));
|
|
||||||
}
|
|
||||||
|
|
||||||
return Column(
|
|
||||||
children: [
|
|
||||||
if (viewModel.selectedStatus ==
|
|
||||||
YourTendersStrings.likeTenders &&
|
|
||||||
viewModel.likedTendersData != null)
|
|
||||||
Expanded(
|
|
||||||
child: LikedDislikedTendersList(
|
|
||||||
data: viewModel.likedTendersData!,
|
|
||||||
status: TenderFeedback.liked.value,
|
|
||||||
isDesktop: false,
|
|
||||||
isMobile: true,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
else if (viewModel.selectedStatus ==
|
|
||||||
YourTendersStrings.dislikeTenders &&
|
|
||||||
viewModel.likedTendersData != null)
|
|
||||||
Expanded(
|
|
||||||
child: LikedDislikedTendersList(
|
|
||||||
data: viewModel.likedTendersData!,
|
|
||||||
status: TenderFeedback.disliked.value,
|
|
||||||
isDesktop: false,
|
|
||||||
isMobile: true,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
else if (viewModel.data != null)
|
|
||||||
Expanded(
|
|
||||||
child: TendersSubmitted(
|
|
||||||
approvedTenders: viewModel.data!,
|
|
||||||
isDesktop: false,
|
|
||||||
isMobile: true,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
else
|
|
||||||
const Expanded(
|
|
||||||
child: Center(
|
|
||||||
child: Text(YourTendersStrings.noTenders),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
);
|
||||||
);
|
}
|
||||||
},
|
|
||||||
|
if (viewModel.errorMessage != null) {
|
||||||
|
return Center(child: Text(viewModel.errorMessage!));
|
||||||
|
}
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
if (viewModel.selectedStatus ==
|
||||||
|
YourTendersStrings.likeTenders &&
|
||||||
|
viewModel.likedTendersData != null)
|
||||||
|
Expanded(
|
||||||
|
child: LikedDislikedTendersList(
|
||||||
|
data: viewModel.likedTendersData!,
|
||||||
|
status: TenderFeedback.liked.value,
|
||||||
|
isDesktop: false,
|
||||||
|
isMobile: true,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
else if (viewModel.selectedStatus ==
|
||||||
|
YourTendersStrings.dislikeTenders &&
|
||||||
|
viewModel.likedTendersData != null)
|
||||||
|
Expanded(
|
||||||
|
child: LikedDislikedTendersList(
|
||||||
|
data: viewModel.likedTendersData!,
|
||||||
|
status: TenderFeedback.disliked.value,
|
||||||
|
isDesktop: false,
|
||||||
|
isMobile: true,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
else if (viewModel.data != null)
|
||||||
|
Expanded(
|
||||||
|
child: TendersSubmitted(
|
||||||
|
approvedTenders: viewModel.data!,
|
||||||
|
isDesktop: false,
|
||||||
|
isMobile: true,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
else
|
||||||
|
const Expanded(
|
||||||
|
child: Center(
|
||||||
|
child: Text(YourTendersStrings.noTenders),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,84 +44,86 @@ 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: SizedBox(
|
child: Center(
|
||||||
width: 720,
|
child: SizedBox(
|
||||||
child: Column(
|
width: 720,
|
||||||
children: [
|
child: Column(
|
||||||
const SizedBox(height: 64.0),
|
children: [
|
||||||
Padding(
|
const SizedBox(height: 64.0),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 8.0.w()),
|
Padding(
|
||||||
child: const TabletDesktopAppbar(
|
padding: EdgeInsets.symmetric(horizontal: 8.0.w()),
|
||||||
title: YourTendersStrings.yourTenders,
|
child: const TabletDesktopAppbar(
|
||||||
|
title: YourTendersStrings.yourTenders,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
SizedBox(height: 24.0.h()),
|
||||||
SizedBox(height: 24.0.h()),
|
const FilterButton(platformType: PlatformType.tabletDesktop),
|
||||||
const FilterButton(platformType: PlatformType.tabletDesktop),
|
|
||||||
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Consumer<YourTendersViewModel>(
|
child: Consumer<YourTendersViewModel>(
|
||||||
builder: (context, viewModel, child) {
|
builder: (context, viewModel, child) {
|
||||||
if (viewModel.isLoading &&
|
if (viewModel.isLoading &&
|
||||||
(viewModel.data == null &&
|
(viewModel.data == null &&
|
||||||
viewModel.likedTendersData == null)) {
|
viewModel.likedTendersData == null)) {
|
||||||
return const Center(
|
return const Center(
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
color: AppColors.secondary50,
|
color: AppColors.secondary50,
|
||||||
),
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (viewModel.errorMessage != null) {
|
||||||
|
return Center(child: Text(viewModel.errorMessage!));
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget content;
|
||||||
|
|
||||||
|
if (viewModel.selectedStatus ==
|
||||||
|
YourTendersStrings.likeTenders &&
|
||||||
|
viewModel.likedTendersData != null) {
|
||||||
|
content = LikedDislikedTendersList(
|
||||||
|
data: viewModel.likedTendersData!,
|
||||||
|
status: TenderFeedback.liked.value,
|
||||||
|
isDesktop: false,
|
||||||
|
isMobile: false,
|
||||||
|
);
|
||||||
|
} else if (viewModel.selectedStatus ==
|
||||||
|
YourTendersStrings.dislikeTenders &&
|
||||||
|
viewModel.likedTendersData != null) {
|
||||||
|
content = LikedDislikedTendersList(
|
||||||
|
data: viewModel.likedTendersData!,
|
||||||
|
status: TenderFeedback.disliked.value,
|
||||||
|
isDesktop: false,
|
||||||
|
isMobile: false,
|
||||||
|
);
|
||||||
|
} else if (viewModel.data != null) {
|
||||||
|
content = TendersSubmitted(
|
||||||
|
approvedTenders: viewModel.data!,
|
||||||
|
isDesktop: false,
|
||||||
|
isMobile: false,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
content = const Center(
|
||||||
|
child: Text(YourTendersStrings.noTenders),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
children: [
|
||||||
|
Expanded(child: content),
|
||||||
|
SizedBox(height: 10.0.h()),
|
||||||
|
|
||||||
|
_listPagesControll(context, viewModel),
|
||||||
|
|
||||||
|
const SizedBox(height: 30.0),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
|
),
|
||||||
if (viewModel.errorMessage != null) {
|
|
||||||
return Center(child: Text(viewModel.errorMessage!));
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget content;
|
|
||||||
|
|
||||||
if (viewModel.selectedStatus ==
|
|
||||||
YourTendersStrings.likeTenders &&
|
|
||||||
viewModel.likedTendersData != null) {
|
|
||||||
content = LikedDislikedTendersList(
|
|
||||||
data: viewModel.likedTendersData!,
|
|
||||||
status: TenderFeedback.liked.value,
|
|
||||||
isDesktop: false,
|
|
||||||
isMobile: false,
|
|
||||||
);
|
|
||||||
} else if (viewModel.selectedStatus ==
|
|
||||||
YourTendersStrings.dislikeTenders &&
|
|
||||||
viewModel.likedTendersData != null) {
|
|
||||||
content = LikedDislikedTendersList(
|
|
||||||
data: viewModel.likedTendersData!,
|
|
||||||
status: TenderFeedback.disliked.value,
|
|
||||||
isDesktop: false,
|
|
||||||
isMobile: false,
|
|
||||||
);
|
|
||||||
} else if (viewModel.data != null) {
|
|
||||||
content = TendersSubmitted(
|
|
||||||
approvedTenders: viewModel.data!,
|
|
||||||
isDesktop: false,
|
|
||||||
isMobile: false,
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
content = const Center(
|
|
||||||
child: Text(YourTendersStrings.noTenders),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Column(
|
|
||||||
children: [
|
|
||||||
Expanded(child: content),
|
|
||||||
SizedBox(height: 10.0.h()),
|
|
||||||
|
|
||||||
_listPagesControll(context, viewModel),
|
|
||||||
|
|
||||||
const SizedBox(height: 30.0),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user