Files
tm_app/lib/views/detail/widgets/tender_detail_header.dart
T
2025-08-09 13:13:32 +03:30

69 lines
2.0 KiB
Dart

import 'package:flutter/material.dart';
import 'package:tm_app/core/constants/strings.dart';
import 'package:tm_app/core/theme/colors.dart';
import 'package:tm_app/core/utils/size_config.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 isBig;
const TenderDetailHeader({required this.isBig, 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()),
const Divider(),
SizedBox(height: 5.0.h()),
TenderDetailInfoSection(isBig: isBig,),
TenderLocationSection(),
SizedBox(height: 16.0.h()),
TenderDocumentSection(),
],
),
);
}
Widget _buildDateAndStatus() => Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
AppStrings.tenderDateExample,
style: TextStyle(
color: AppColors.grey60,
fontWeight: FontWeight.w400,
fontSize: 12.0.sp(),
),
),
const StatusTag(
text: AppStrings.tenderStatusOpen,
textColor: AppColors.cyanTeal,
backgroundColor: AppColors.cyanAqua,
),
],
);
Widget _buildTitle() => Text(
AppStrings.tenderTitleExample,
style: TextStyle(
color: AppColors.grey80,
fontWeight: FontWeight.w600,
fontSize: 18.0.sp(),
),
);
}