Fixed size on web and changed details design button in desktop and tablet
This commit is contained in:
@@ -13,6 +13,8 @@ class TenderDetailDesktopPage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
SizeConfig.init(context);
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
appBar: _buildAppBar(context),
|
||||
@@ -25,11 +27,11 @@ class TenderDetailDesktopPage extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
TenderDetailHeader(isBig: true),
|
||||
TenderDetailHeader(isScreenBig: true),
|
||||
SizedBox(height: 24.0.h()),
|
||||
const TenderDetailCard(),
|
||||
SizedBox(height: 24.0.h()),
|
||||
TenderDetailActions(),
|
||||
TenderDetailActions(isScreenBig: true),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -22,11 +22,11 @@ class TenderDetailMobilePage extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
TenderDetailHeader(isBig: false),
|
||||
TenderDetailHeader(isScreenBig: false),
|
||||
SizedBox(height: 24.0.h()),
|
||||
const TenderDetailCard(),
|
||||
SizedBox(height: 24.0.h()),
|
||||
TenderDetailActions(),
|
||||
TenderDetailActions(isScreenBig: false,),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -38,7 +38,7 @@ class TenderDetailMobilePage extends StatelessWidget {
|
||||
return PreferredSize(
|
||||
preferredSize: const Size.fromHeight(60),
|
||||
child: AppBar(
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
elevation: 0,
|
||||
titleSpacing: 0,
|
||||
leading: IconButton(
|
||||
|
||||
@@ -25,11 +25,11 @@ class TenderDetailTabletPage extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
TenderDetailHeader(isBig: true),
|
||||
TenderDetailHeader(isScreenBig: true),
|
||||
SizedBox(height: 24.0.h()),
|
||||
const TenderDetailCard(),
|
||||
SizedBox(height: 24.0.h()),
|
||||
TenderDetailActions(),
|
||||
TenderDetailActions(isScreenBig: true,),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -43,7 +43,7 @@ class TenderDetailTabletPage extends StatelessWidget {
|
||||
return PreferredSize(
|
||||
preferredSize: const Size.fromHeight(60),
|
||||
child: AppBar(
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
elevation: 0,
|
||||
titleSpacing: 0,
|
||||
leading: IconButton(
|
||||
|
||||
@@ -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(),
|
||||
],
|
||||
),
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,31 +5,56 @@ import 'package:tm_app/core/utils/size_config.dart';
|
||||
import 'package:tm_app/views/login/widgets/login_button.dart';
|
||||
|
||||
class TenderDetailActions extends StatelessWidget {
|
||||
const TenderDetailActions({super.key});
|
||||
final bool isScreenBig;
|
||||
const TenderDetailActions({required this.isScreenBig, super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
BaseButton(
|
||||
isEnabled: true,
|
||||
text: AppStrings.tenderSubmitButton,
|
||||
backgroundColor: AppColors.lightBlue,
|
||||
textColor: AppColors.mainBlue,
|
||||
onPressed: () {},
|
||||
),
|
||||
SizedBox(height: 16.0.h()),
|
||||
BaseButton(
|
||||
isEnabled: true,
|
||||
text: AppStrings.tenderRejectButton,
|
||||
borderColor: AppColors.red10,
|
||||
textColor: AppColors.red10,
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
borderWidth: 1,
|
||||
onPressed: () {},
|
||||
),
|
||||
SizedBox(height: 16.0.h()),
|
||||
],
|
||||
);
|
||||
return isScreenBig
|
||||
? Row(
|
||||
children: [
|
||||
Spacer(),
|
||||
BaseButton(
|
||||
isEnabled: true,
|
||||
text: AppStrings.tenderRejectButton,
|
||||
textColor: AppColors.red10,
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
borderWidth: 1,
|
||||
onPressed: () {},
|
||||
width: 120.0.w(),
|
||||
),
|
||||
SizedBox(width: 5.0.w()),
|
||||
BaseButton(
|
||||
isEnabled: true,
|
||||
text: AppStrings.tenderSubmitButton,
|
||||
backgroundColor: AppColors.lightBlue,
|
||||
textColor: AppColors.mainBlue,
|
||||
onPressed: () {},
|
||||
width: 120.0.w(),
|
||||
),
|
||||
],
|
||||
)
|
||||
: Column(
|
||||
children: [
|
||||
BaseButton(
|
||||
isEnabled: true,
|
||||
text: AppStrings.tenderSubmitButton,
|
||||
backgroundColor: AppColors.lightBlue,
|
||||
textColor: AppColors.mainBlue,
|
||||
onPressed: () {},
|
||||
),
|
||||
SizedBox(height: 16.0.h()),
|
||||
BaseButton(
|
||||
isEnabled: true,
|
||||
text: AppStrings.tenderRejectButton,
|
||||
borderColor: AppColors.red10,
|
||||
textColor: AppColors.red10,
|
||||
backgroundColor: AppColors.backgroundColor,
|
||||
borderWidth: 1,
|
||||
onPressed: () {},
|
||||
),
|
||||
SizedBox(height: 16.0.h()),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ import 'package:tm_app/views/detail/widgets/tender_document_section.dart';
|
||||
import 'package:tm_app/views/detail/widgets/tender_location_section.dart';
|
||||
|
||||
class TenderDetailHeader extends StatelessWidget {
|
||||
final bool isBig;
|
||||
const TenderDetailHeader({required this.isBig, super.key});
|
||||
final bool isScreenBig;
|
||||
const TenderDetailHeader({required this.isScreenBig, super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -29,7 +29,7 @@ class TenderDetailHeader extends StatelessWidget {
|
||||
SizedBox(height: 10.0.h()),
|
||||
const Divider(),
|
||||
SizedBox(height: 5.0.h()),
|
||||
TenderDetailInfoSection(isBig: isBig,),
|
||||
TenderDetailInfoSection(isScreenBig: isScreenBig),
|
||||
TenderLocationSection(),
|
||||
SizedBox(height: 16.0.h()),
|
||||
TenderDocumentSection(),
|
||||
|
||||
@@ -4,9 +4,9 @@ import 'package:tm_app/views/detail/widgets/deadline_item.dart';
|
||||
import 'package:tm_app/views/detail/widgets/info_item.dart';
|
||||
|
||||
class TenderDetailInfoSection extends StatelessWidget {
|
||||
final bool isBig;
|
||||
final bool isScreenBig;
|
||||
|
||||
const TenderDetailInfoSection({required this.isBig ,super.key});
|
||||
const TenderDetailInfoSection({required this.isScreenBig, super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -22,7 +22,8 @@ class TenderDetailInfoSection extends StatelessWidget {
|
||||
approvalText: AppStrings.tenderApprovalText,
|
||||
approvalDate: AppStrings.tenderApprovalDateExample,
|
||||
submissionText: AppStrings.tenderSubmissionText,
|
||||
submissionDate: AppStrings.tenderSubmissionDateExample, isBig: isBig,
|
||||
submissionDate: AppStrings.tenderSubmissionDateExample,
|
||||
isScreenBig: isScreenBig,
|
||||
),
|
||||
InfoItem(
|
||||
title: AppStrings.tenderClientLabel,
|
||||
|
||||
Reference in New Issue
Block a user