diff --git a/lib/core/theme/colors.dart b/lib/core/theme/colors.dart index 2a713b4..948a7df 100644 --- a/lib/core/theme/colors.dart +++ b/lib/core/theme/colors.dart @@ -164,6 +164,7 @@ class AppColors { // Primary color variations static const Color primary2 = Color(0xFFE5EFFF); + static const Color primary40 = Color(0xFFB4D1FF); static const Color secondary50 = Color(0xFF34BCCB); // Red variations (status colors) diff --git a/lib/views/tenders/strings/tenders_strings.dart b/lib/views/tenders/strings/tenders_strings.dart index 73aa43c..9f8af32 100644 --- a/lib/views/tenders/strings/tenders_strings.dart +++ b/lib/views/tenders/strings/tenders_strings.dart @@ -7,7 +7,7 @@ class TendersStrings { static const String submit = 'Submit'; static const String dislike = 'Dislike'; static const String like = 'Like'; - static const String tenderDeadlineLabel = 'Deadline'; + static const String tenderDeadlineLabel = 'Deadline :'; static const String contracts = 'Contracts'; static const String notifications = 'Notifications'; static const String of = 'Of'; @@ -25,4 +25,5 @@ class TendersStrings { static const String sort = 'Sort'; static const String mostOfTheTime = 'Most of the time'; static const String minimumTime = 'Minimum time'; + static const String tenderBudgetLabel = 'Budget :'; } diff --git a/lib/views/tenders/widgets/tender_card.dart b/lib/views/tenders/widgets/tender_card.dart index 77f72c1..62ca7be 100644 --- a/lib/views/tenders/widgets/tender_card.dart +++ b/lib/views/tenders/widgets/tender_card.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart' hide DateUtils; import 'package:flutter_svg/svg.dart'; import 'package:tm_app/core/routes/app_routes.dart'; +import 'package:tm_app/core/utils/price_extension.dart'; import 'package:tm_app/data/services/model/tender_data/tender_data.dart'; import '../../../core/constants/assets.dart'; @@ -24,7 +25,7 @@ class TenderCard extends StatelessWidget { Container( width: double.infinity, margin: EdgeInsets.symmetric(horizontal: 16.0.w()), - height: isDesktop ? 290.0.h() : 587.0.h(), + height: isDesktop ? 350.0.h() : 587.0.h(), decoration: BoxDecoration( color: AppColors.grey0, borderRadius: BorderRadius.circular(12), @@ -126,29 +127,78 @@ class TenderCard extends StatelessWidget { Widget _deadlineBadge() { return Container( width: double.infinity, - height: 24.0.h(), - padding: EdgeInsets.symmetric(horizontal: 8.0.w()), + // height: 24.0.h(), + // height: 65.0.h(), + padding: EdgeInsets.symmetric(horizontal: 8.0.w(), vertical: 6.0.h()), decoration: BoxDecoration( color: AppColors.primary20, borderRadius: BorderRadius.circular(4), ), - child: Row( + child: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( - TendersStrings.tenderDeadlineLabel, - style: TextStyle( - color: AppColors.textBlue, - fontSize: 14.0.sp(), - fontWeight: FontWeight.w500, - ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + TendersStrings.tenderDeadlineLabel, + style: TextStyle( + color: AppColors.textBlue, + fontSize: 14.0.sp(), + fontWeight: FontWeight.w500, + ), + ), + SizedBox(width: 4.0.w()), + Text( + timeConvertor(tender.submissionDeadline ?? 0), + style: TextStyle( + color: AppColors.grey80, + fontSize: 14.0.sp(), + fontWeight: FontWeight.w500, + ), + ), + ], ), - Text( - timeConvertor(tender.submissionDeadline ?? 0), - style: TextStyle( - color: AppColors.grey80, - fontSize: 14.0.sp(), - fontWeight: FontWeight.w500, + // SizedBox(height: 4.0.h()), + Visibility( + visible: + tender.estimatedValue != null && tender.estimatedValue != 0, + child: const Divider(color: AppColors.primary40), + ), + // SizedBox(height: 4.0.h()), + Visibility( + visible: + tender.estimatedValue != null && tender.estimatedValue != 0, + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + TendersStrings.tenderBudgetLabel, + style: TextStyle( + color: AppColors.textBlue, + fontSize: 14.0.sp(), + fontWeight: FontWeight.w500, + ), + ), + SizedBox(width: 4.0.w()), + Text( + tender.estimatedValue?.formattedPrice ?? '', + style: TextStyle( + color: AppColors.grey80, + fontSize: 14.0.sp(), + fontWeight: FontWeight.w500, + ), + ), + SizedBox(width: 4.0.w()), + Text( + tender.currency ?? '', + style: TextStyle( + color: AppColors.grey80, + fontSize: 14.0.sp(), + fontWeight: FontWeight.w500, + ), + ), + ], ), ), ],