detail refactor
This commit is contained in:
@@ -1,21 +1,18 @@
|
||||
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 '../../../core/constants/strings.dart';
|
||||
import '../../../data/services/model/tender_data/tender_data.dart';
|
||||
|
||||
class DeadlineItem extends StatelessWidget {
|
||||
final String title;
|
||||
final String approvalText;
|
||||
final String approvalDate;
|
||||
final String submissionText;
|
||||
final String submissionDate;
|
||||
final TenderData detail;
|
||||
final bool isScreenBig;
|
||||
|
||||
const DeadlineItem({
|
||||
required this.title,
|
||||
required this.approvalText,
|
||||
required this.approvalDate,
|
||||
required this.submissionText,
|
||||
required this.submissionDate,
|
||||
required this.detail,
|
||||
|
||||
required this.isScreenBig,
|
||||
super.key,
|
||||
});
|
||||
@@ -31,7 +28,7 @@ class DeadlineItem extends StatelessWidget {
|
||||
SizedBox(
|
||||
height: 45.0.h(),
|
||||
child: Text(
|
||||
title,
|
||||
detail.title ?? '',
|
||||
style: TextStyle(
|
||||
color: AppColors.grey80,
|
||||
fontWeight: FontWeight.w600,
|
||||
@@ -47,7 +44,7 @@ class DeadlineItem extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
approvalText,
|
||||
AppStrings.tenderApprovalText,
|
||||
style: TextStyle(
|
||||
color: AppColors.grey70,
|
||||
fontWeight: FontWeight.w400,
|
||||
@@ -56,7 +53,7 @@ class DeadlineItem extends StatelessWidget {
|
||||
),
|
||||
SizedBox(height: 4.0.h()),
|
||||
Text(
|
||||
approvalDate,
|
||||
unixToDate(detail.submissionDeadline),
|
||||
style: TextStyle(
|
||||
color: AppColors.grey80,
|
||||
fontWeight: FontWeight.w400,
|
||||
@@ -76,7 +73,7 @@ class DeadlineItem extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
submissionText,
|
||||
AppStrings.tenderSubmissionText,
|
||||
style: TextStyle(
|
||||
color: AppColors.grey70,
|
||||
fontWeight: FontWeight.w400,
|
||||
@@ -85,7 +82,7 @@ class DeadlineItem extends StatelessWidget {
|
||||
),
|
||||
SizedBox(height: 4.0.h()),
|
||||
Text(
|
||||
submissionDate,
|
||||
unixToDate(detail.applicationDeadline),
|
||||
style: TextStyle(
|
||||
color: AppColors.grey80,
|
||||
fontWeight: FontWeight.w400,
|
||||
@@ -99,7 +96,7 @@ class DeadlineItem extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8.0.h()),
|
||||
Divider(color: AppColors.grey20,),
|
||||
Divider(color: AppColors.grey20),
|
||||
],
|
||||
),
|
||||
)
|
||||
@@ -111,7 +108,7 @@ class DeadlineItem extends StatelessWidget {
|
||||
SizedBox(
|
||||
height: 45.0.h(),
|
||||
child: Text(
|
||||
title,
|
||||
detail.title ?? '',
|
||||
style: TextStyle(
|
||||
color: AppColors.grey80,
|
||||
fontWeight: FontWeight.w600,
|
||||
@@ -123,7 +120,7 @@ class DeadlineItem extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
approvalText,
|
||||
AppStrings.tenderApprovalText,
|
||||
style: TextStyle(
|
||||
color: AppColors.grey70,
|
||||
fontWeight: FontWeight.w400,
|
||||
@@ -131,7 +128,7 @@ class DeadlineItem extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
approvalDate,
|
||||
unixToDate(detail.submissionDeadline),
|
||||
style: TextStyle(
|
||||
color: AppColors.grey70,
|
||||
fontWeight: FontWeight.w400,
|
||||
@@ -145,7 +142,7 @@ class DeadlineItem extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
submissionText,
|
||||
AppStrings.tenderSubmissionText,
|
||||
style: TextStyle(
|
||||
color: AppColors.grey70,
|
||||
fontWeight: FontWeight.w400,
|
||||
@@ -153,7 +150,7 @@ class DeadlineItem extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
submissionDate,
|
||||
unixToDate(detail.applicationDeadline),
|
||||
style: TextStyle(
|
||||
color: AppColors.grey70,
|
||||
fontWeight: FontWeight.w400,
|
||||
@@ -163,7 +160,7 @@ class DeadlineItem extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8.0.h()),
|
||||
Divider(color: AppColors.grey20,),
|
||||
Divider(color: AppColors.grey20),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user