165 lines
5.7 KiB
Dart
165 lines
5.7 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:tm_app/core/theme/colors.dart';
|
|
import 'package:tm_app/core/utils/date_utils.dart';
|
|
import 'package:tm_app/core/utils/size_config.dart';
|
|
import 'package:tm_app/views/detail/strings/tender_details_strings.dart';
|
|
|
|
import '../../../data/services/model/tender_data/tender_data.dart';
|
|
|
|
class DeadlineItem extends StatelessWidget {
|
|
final TenderData detail;
|
|
final bool isScreenBig;
|
|
|
|
const DeadlineItem({
|
|
required this.detail,
|
|
|
|
required this.isScreenBig,
|
|
super.key,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return isScreenBig
|
|
? Padding(
|
|
padding: const EdgeInsets.symmetric(vertical: 0),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
TenderDetailsStrings.tenderDeadlineLabel,
|
|
style: TextStyle(
|
|
color: AppColors.grey80,
|
|
fontWeight: FontWeight.w600,
|
|
fontSize: 16.0.sp(),
|
|
),
|
|
),
|
|
SizedBox(height: 12.0.h()),
|
|
IntrinsicHeight(
|
|
child: Row(
|
|
children: [
|
|
Expanded(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
TenderDetailsStrings.pleaseReplyBy,
|
|
style: TextStyle(
|
|
color: AppColors.grey70,
|
|
fontWeight: FontWeight.w500,
|
|
fontSize: 14.0.sp(),
|
|
),
|
|
),
|
|
SizedBox(height: 4.0.h()),
|
|
Text(
|
|
timeConvertor(detail.submissionDeadline!),
|
|
style: TextStyle(
|
|
color: AppColors.grey80,
|
|
fontWeight: FontWeight.w400,
|
|
fontSize: 14.0.sp(),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
VerticalDivider(
|
|
color: AppColors.grey30,
|
|
thickness: 1,
|
|
width: 24,
|
|
),
|
|
Expanded(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
TenderDetailsStrings.lastDayToPrepareProposal,
|
|
style: TextStyle(
|
|
color: AppColors.grey70,
|
|
fontWeight: FontWeight.w500,
|
|
fontSize: 14.0.sp(),
|
|
),
|
|
),
|
|
SizedBox(height: 4.0.h()),
|
|
Text(
|
|
timeConvertor(detail.applicationDeadline!),
|
|
style: TextStyle(
|
|
color: AppColors.grey80,
|
|
fontWeight: FontWeight.w400,
|
|
fontSize: 14.0.sp(),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(height: 8.0.h()),
|
|
Divider(color: AppColors.grey20),
|
|
],
|
|
),
|
|
)
|
|
: Padding(
|
|
padding: const EdgeInsets.symmetric(vertical: 0),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
TenderDetailsStrings.tenderDeadlineLabel,
|
|
style: TextStyle(
|
|
color: AppColors.grey80,
|
|
fontWeight: FontWeight.w600,
|
|
fontSize: 16.0.sp(),
|
|
),
|
|
),
|
|
SizedBox(height: 12.0.h()),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(
|
|
TenderDetailsStrings.pleaseReplyBy,
|
|
style: TextStyle(
|
|
color: AppColors.grey70,
|
|
fontWeight: FontWeight.w500,
|
|
fontSize: 14.0.sp(),
|
|
),
|
|
),
|
|
Text(
|
|
timeConvertor(detail.submissionDeadline!),
|
|
style: TextStyle(
|
|
color: AppColors.grey70,
|
|
fontWeight: FontWeight.w400,
|
|
fontSize: 14.0.sp(),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
SizedBox(height: 4.0.h()),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(
|
|
TenderDetailsStrings.lastDayToPrepareProposal,
|
|
style: TextStyle(
|
|
color: AppColors.grey70,
|
|
fontWeight: FontWeight.w500,
|
|
fontSize: 14.0.sp(),
|
|
),
|
|
),
|
|
Text(
|
|
timeConvertor(detail.applicationDeadline!),
|
|
style: TextStyle(
|
|
color: AppColors.grey70,
|
|
fontWeight: FontWeight.w400,
|
|
fontSize: 14.0.sp(),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
SizedBox(height: 8.0.h()),
|
|
Divider(color: AppColors.grey20),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|