From 5debd0f2052900bc3f9e3a1e54e62baef80f6a72 Mon Sep 17 00:00:00 2001 From: llsajjad Date: Wed, 6 Aug 2025 08:17:18 +0330 Subject: [PATCH] Fixed ui details bug --- lib/views/detail/detail_screen.dart | 82 +++++++++++++++++++++++++++-- 1 file changed, 79 insertions(+), 3 deletions(-) diff --git a/lib/views/detail/detail_screen.dart b/lib/views/detail/detail_screen.dart index bafdd20..33002d4 100644 --- a/lib/views/detail/detail_screen.dart +++ b/lib/views/detail/detail_screen.dart @@ -83,9 +83,12 @@ class TenderDetailScreen extends StatelessWidget { SizedBox(height: 5.0.h()), infoItem('ID', 'JNDFKMDV-100-JF'), - infoItem( - 'Deadline', - 'For approval: 2025-05-21\nFor submission: 2025-05-21', + deadlineItem( + title: 'Deadline', + approvalText: 'For approval', + approvalDate: '2025-05-21', + submissionText: 'For submission', + submissionDate: '2025-05-21', ), infoItem('Client', 'Procurement Notice Procurement Notice'), infoItem('Delivery Locations', 'Norrbotten County'), @@ -207,6 +210,79 @@ class TenderDetailScreen extends StatelessWidget { ); } + Widget deadlineItem({ + required String title, + required String approvalText, + required String approvalDate, + required String submissionText, + required String submissionDate, + }) { + return Padding( + padding: EdgeInsets.symmetric(vertical: 0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 45.0.h(), + child: Text( + title, + style: TextStyle( + color: AppColors.grey80, + fontWeight: FontWeight.w600, + fontSize: 16.0.sp(), + ), + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + approvalText, + style: TextStyle( + color: AppColors.grey70, + fontWeight: FontWeight.w400, + fontSize: 14.0.sp(), + ), + ), + Text( + approvalDate, + style: TextStyle( + color: AppColors.grey70, + fontWeight: FontWeight.w400, + fontSize: 14.0.sp(), + ), + ), + ], + ), + SizedBox(height: 4.0.h()), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + submissionText, + style: TextStyle( + color: AppColors.grey70, + fontWeight: FontWeight.w400, + fontSize: 14.0.sp(), + ), + ), + Text( + submissionDate, + style: TextStyle( + color: AppColors.grey70, + fontWeight: FontWeight.w400, + fontSize: 14.0.sp(), + ), + ), + ], + ), + SizedBox(height: 8.0.h()), + Divider(), + ], + ), + ); + } + Widget infoItem(String title, String value) { return Padding( padding: const EdgeInsets.symmetric(vertical: 0),