adde budget badge on tenders

This commit is contained in:
amirrezaghabeli
2025-09-30 12:59:12 +03:30
parent bfc236edc6
commit b9cc4cb11f
3 changed files with 70 additions and 18 deletions
+1
View File
@@ -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)
@@ -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 :';
}
+67 -17
View File
@@ -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,
),
),
],
),
),
],