172 lines
5.6 KiB
Dart
172 lines
5.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:tm_app/core/theme/colors.dart';
|
|
import 'package:tm_app/core/utils/size_config.dart';
|
|
|
|
class DeadlineItem extends StatelessWidget {
|
|
final String title;
|
|
final String approvalText;
|
|
final String approvalDate;
|
|
final String submissionText;
|
|
final String submissionDate;
|
|
final bool isScreenBig;
|
|
|
|
const DeadlineItem({
|
|
required this.title,
|
|
required this.approvalText,
|
|
required this.approvalDate,
|
|
required this.submissionText,
|
|
required this.submissionDate,
|
|
required this.isScreenBig,
|
|
super.key,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return isScreenBig
|
|
? Padding(
|
|
padding: EdgeInsets.symmetric(vertical: 0),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
SizedBox(
|
|
height: 45.0.h(),
|
|
child: Text(
|
|
title,
|
|
style: TextStyle(
|
|
color: AppColors.grey80,
|
|
fontWeight: FontWeight.w600,
|
|
fontSize: 16.0.sp(),
|
|
),
|
|
),
|
|
),
|
|
IntrinsicHeight(
|
|
child: Row(
|
|
children: [
|
|
Expanded(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
approvalText,
|
|
style: TextStyle(
|
|
color: AppColors.grey70,
|
|
fontWeight: FontWeight.w400,
|
|
fontSize: 14.0.sp(),
|
|
),
|
|
),
|
|
SizedBox(height: 4.0.h()),
|
|
Text(
|
|
approvalDate,
|
|
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(
|
|
submissionText,
|
|
style: TextStyle(
|
|
color: AppColors.grey70,
|
|
fontWeight: FontWeight.w400,
|
|
fontSize: 14.0.sp(),
|
|
),
|
|
),
|
|
SizedBox(height: 4.0.h()),
|
|
Text(
|
|
submissionDate,
|
|
style: TextStyle(
|
|
color: AppColors.grey80,
|
|
fontWeight: FontWeight.w400,
|
|
fontSize: 14.0.sp(),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(height: 8.0.h()),
|
|
const Divider(),
|
|
],
|
|
),
|
|
)
|
|
: Padding(
|
|
padding: EdgeInsets.symmetric(vertical: 0),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
SizedBox(
|
|
height: 45.0.h(),
|
|
child: Text(
|
|
title,
|
|
style: TextStyle(
|
|
color: AppColors.grey80,
|
|
fontWeight: FontWeight.w600,
|
|
fontSize: 16.0.sp(),
|
|
),
|
|
),
|
|
),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(
|
|
approvalText,
|
|
style: TextStyle(
|
|
color: AppColors.grey70,
|
|
fontWeight: FontWeight.w400,
|
|
fontSize: 14.0.sp(),
|
|
),
|
|
),
|
|
Text(
|
|
approvalDate,
|
|
style: TextStyle(
|
|
color: AppColors.grey70,
|
|
fontWeight: FontWeight.w400,
|
|
fontSize: 14.0.sp(),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
SizedBox(height: 4.0.h()),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(
|
|
submissionText,
|
|
style: TextStyle(
|
|
color: AppColors.grey70,
|
|
fontWeight: FontWeight.w400,
|
|
fontSize: 14.0.sp(),
|
|
),
|
|
),
|
|
Text(
|
|
submissionDate,
|
|
style: TextStyle(
|
|
color: AppColors.grey70,
|
|
fontWeight: FontWeight.w400,
|
|
fontSize: 14.0.sp(),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
SizedBox(height: 8.0.h()),
|
|
const Divider(),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|