adde budget badge on tenders
This commit is contained in:
@@ -164,6 +164,7 @@ class AppColors {
|
|||||||
|
|
||||||
// Primary color variations
|
// Primary color variations
|
||||||
static const Color primary2 = Color(0xFFE5EFFF);
|
static const Color primary2 = Color(0xFFE5EFFF);
|
||||||
|
static const Color primary40 = Color(0xFFB4D1FF);
|
||||||
static const Color secondary50 = Color(0xFF34BCCB);
|
static const Color secondary50 = Color(0xFF34BCCB);
|
||||||
|
|
||||||
// Red variations (status colors)
|
// Red variations (status colors)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ class TendersStrings {
|
|||||||
static const String submit = 'Submit';
|
static const String submit = 'Submit';
|
||||||
static const String dislike = 'Dislike';
|
static const String dislike = 'Dislike';
|
||||||
static const String like = 'Like';
|
static const String like = 'Like';
|
||||||
static const String tenderDeadlineLabel = 'Deadline';
|
static const String tenderDeadlineLabel = 'Deadline :';
|
||||||
static const String contracts = 'Contracts';
|
static const String contracts = 'Contracts';
|
||||||
static const String notifications = 'Notifications';
|
static const String notifications = 'Notifications';
|
||||||
static const String of = 'Of';
|
static const String of = 'Of';
|
||||||
@@ -25,4 +25,5 @@ class TendersStrings {
|
|||||||
static const String sort = 'Sort';
|
static const String sort = 'Sort';
|
||||||
static const String mostOfTheTime = 'Most of the time';
|
static const String mostOfTheTime = 'Most of the time';
|
||||||
static const String minimumTime = 'Minimum time';
|
static const String minimumTime = 'Minimum time';
|
||||||
|
static const String tenderBudgetLabel = 'Budget :';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart' hide DateUtils;
|
import 'package:flutter/material.dart' hide DateUtils;
|
||||||
import 'package:flutter_svg/svg.dart';
|
import 'package:flutter_svg/svg.dart';
|
||||||
import 'package:tm_app/core/routes/app_routes.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 'package:tm_app/data/services/model/tender_data/tender_data.dart';
|
||||||
|
|
||||||
import '../../../core/constants/assets.dart';
|
import '../../../core/constants/assets.dart';
|
||||||
@@ -24,7 +25,7 @@ class TenderCard extends StatelessWidget {
|
|||||||
Container(
|
Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
margin: EdgeInsets.symmetric(horizontal: 16.0.w()),
|
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(
|
decoration: BoxDecoration(
|
||||||
color: AppColors.grey0,
|
color: AppColors.grey0,
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
@@ -126,14 +127,18 @@ class TenderCard extends StatelessWidget {
|
|||||||
Widget _deadlineBadge() {
|
Widget _deadlineBadge() {
|
||||||
return Container(
|
return Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 24.0.h(),
|
// height: 24.0.h(),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 8.0.w()),
|
// height: 65.0.h(),
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 8.0.w(), vertical: 6.0.h()),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppColors.primary20,
|
color: AppColors.primary20,
|
||||||
borderRadius: BorderRadius.circular(4),
|
borderRadius: BorderRadius.circular(4),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
TendersStrings.tenderDeadlineLabel,
|
TendersStrings.tenderDeadlineLabel,
|
||||||
@@ -143,6 +148,7 @@ class TenderCard extends StatelessWidget {
|
|||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
SizedBox(width: 4.0.w()),
|
||||||
Text(
|
Text(
|
||||||
timeConvertor(tender.submissionDeadline ?? 0),
|
timeConvertor(tender.submissionDeadline ?? 0),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@@ -153,6 +159,50 @@ class TenderCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
// 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,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user