Fixed size on web and changed details design button in desktop and tablet
This commit is contained in:
@@ -8,156 +8,164 @@ class DeadlineItem extends StatelessWidget {
|
||||
final String approvalDate;
|
||||
final String submissionText;
|
||||
final String submissionDate;
|
||||
final bool isBig;
|
||||
final bool isScreenBig;
|
||||
|
||||
const DeadlineItem({
|
||||
required this.title, required this.approvalText, required this.approvalDate, required this.submissionText, required this.submissionDate, required this.isBig, super.key,
|
||||
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 isBig ? 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(),
|
||||
),
|
||||
),
|
||||
],
|
||||
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(),
|
||||
),
|
||||
),
|
||||
VerticalDivider(
|
||||
color: AppColors.grey30,
|
||||
thickness: 1,
|
||||
width: 24,
|
||||
),
|
||||
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(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
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(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
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(),
|
||||
),
|
||||
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(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
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(),
|
||||
],
|
||||
),
|
||||
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(),
|
||||
],
|
||||
),
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user