71 lines
2.2 KiB
Dart
71 lines
2.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:tm_app/core/theme/colors.dart';
|
|
import 'package:tm_app/core/utils/size_config.dart';
|
|
import 'package:tm_app/data/services/model/tender_detail_response/tender_detail_response_model.dart';
|
|
import 'package:tm_app/views/detail/widgets/status_tag.dart';
|
|
import 'package:tm_app/views/detail/widgets/tender_detail_info_section.dart';
|
|
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 isScreenBig;
|
|
final TenderDetailResponseModel detail;
|
|
|
|
const TenderDetailHeader({required this.isScreenBig, required this.detail, super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
padding: const EdgeInsets.all(16),
|
|
decoration: BoxDecoration(
|
|
color: AppColors.backgroundColor,
|
|
borderRadius: BorderRadius.circular(5),
|
|
border: Border.all(width: 0.5, color: AppColors.grey50),
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
_buildDateAndStatus(),
|
|
SizedBox(height: 12.0.h()),
|
|
_buildTitle(),
|
|
SizedBox(height: 10.0.h()),
|
|
Divider(color: AppColors.grey20,),
|
|
SizedBox(height: 5.0.h()),
|
|
TenderDetailInfoSection(isScreenBig: isScreenBig, detail: detail),
|
|
TenderLocationSection(detail: detail),
|
|
SizedBox(height: 16.0.h()),
|
|
TenderDocumentSection(detail: detail),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _buildDateAndStatus() => Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(
|
|
detail.date ?? '',
|
|
style: TextStyle(
|
|
color: AppColors.grey60,
|
|
fontWeight: FontWeight.w400,
|
|
fontSize: 12.0.sp(),
|
|
),
|
|
),
|
|
StatusTag(
|
|
text: detail.status ?? '',
|
|
textColor: AppColors.cyanTeal,
|
|
backgroundColor: AppColors.cyanAqua,
|
|
),
|
|
],
|
|
);
|
|
|
|
Widget _buildTitle() => Text(
|
|
detail.title ?? '',
|
|
style: TextStyle(
|
|
color: AppColors.grey80,
|
|
fontWeight: FontWeight.w600,
|
|
fontSize: 18.0.sp(),
|
|
),
|
|
);
|
|
}
|