added logic for detail
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
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/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';
|
||||
@@ -9,7 +9,9 @@ import 'package:tm_app/views/detail/widgets/tender_location_section.dart';
|
||||
|
||||
class TenderDetailHeader extends StatelessWidget {
|
||||
final bool isScreenBig;
|
||||
const TenderDetailHeader({required this.isScreenBig, super.key});
|
||||
final TenderDetailResponseModel detail;
|
||||
|
||||
const TenderDetailHeader({required this.isScreenBig, required this.detail, super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -29,10 +31,10 @@ class TenderDetailHeader extends StatelessWidget {
|
||||
SizedBox(height: 10.0.h()),
|
||||
const Divider(),
|
||||
SizedBox(height: 5.0.h()),
|
||||
TenderDetailInfoSection(isScreenBig: isScreenBig),
|
||||
TenderLocationSection(),
|
||||
TenderDetailInfoSection(isScreenBig: isScreenBig, detail: detail),
|
||||
TenderLocationSection(detail: detail),
|
||||
SizedBox(height: 16.0.h()),
|
||||
TenderDocumentSection(),
|
||||
TenderDocumentSection(detail: detail),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -42,15 +44,15 @@ class TenderDetailHeader extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
AppStrings.tenderDateExample,
|
||||
detail.date ?? '',
|
||||
style: TextStyle(
|
||||
color: AppColors.grey60,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 12.0.sp(),
|
||||
),
|
||||
),
|
||||
const StatusTag(
|
||||
text: AppStrings.tenderStatusOpen,
|
||||
StatusTag(
|
||||
text: detail.status ?? '',
|
||||
textColor: AppColors.cyanTeal,
|
||||
backgroundColor: AppColors.cyanAqua,
|
||||
),
|
||||
@@ -58,7 +60,7 @@ class TenderDetailHeader extends StatelessWidget {
|
||||
);
|
||||
|
||||
Widget _buildTitle() => Text(
|
||||
AppStrings.tenderTitleExample,
|
||||
detail.title ?? '',
|
||||
style: TextStyle(
|
||||
color: AppColors.grey80,
|
||||
fontWeight: FontWeight.w600,
|
||||
|
||||
Reference in New Issue
Block a user