Files
tm_app/lib/views/detail/widgets/tender_detail_card.dart
T
AmirReza Jamali 86ed7bc665 Refactor tender detail models and UI components for improved clarity and functionality
- Updated the `Lot`, `Organization`, and `OrganizationAddress` models to enhance data mapping for tender details.
- Revised the `TenderData` model to include additional fields reflecting the API response structure.
- Improved UI components across desktop, mobile, and tablet views by commenting out unused sections for future use.
- Added new string constants for lot details in the tender information section.
- Enhanced unit tests to cover new model fields and ensure resilience to partial API payloads.
2026-06-05 19:42:09 +03:30

99 lines
3.3 KiB
Dart

// Currently unused — its usages on the tender-details pages are disabled because
// it renders a static/mock "profile match + incomplete resume" card rather than
// backend data. Kept for when the profile-match score is available from the API.
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_data/tender_data.dart';
import 'package:tm_app/views/detail/strings/tender_details_strings.dart';
class TenderDetailCard extends StatelessWidget {
final TenderData detail;
const TenderDetailCard({required this.detail, super.key});
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: AppColors.paleOrange,
borderRadius: BorderRadius.circular(8),
border: Border.all(color: AppColors.veryPaleOrange),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
TenderDetailsStrings.tenderMatchProfile,
style: TextStyle(
fontSize: 12.0.sp(),
color: AppColors.grey80,
fontWeight: FontWeight.w400,
),
),
Text(
'75%',
style: TextStyle(
fontSize: 12.0.sp(),
fontWeight: FontWeight.w600,
color: AppColors.jellyBean,
),
),
],
),
SizedBox(height: 6.0.h()),
ClipRRect(
borderRadius: BorderRadius.circular(4),
child: LinearProgressIndicator(
value: 0.75,
backgroundColor: AppColors.grey20,
valueColor: const AlwaysStoppedAnimation<Color>(
AppColors.jellyBean,
),
minHeight: 6.0.h(),
),
),
SizedBox(height: 16.0.h()),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Icon(Icons.warning_rounded, color: AppColors.red),
SizedBox(width: 8.0.w()),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TenderDetailsStrings.tenderIncompleteResume,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 16.0.sp(),
color: AppColors.grey80,
),
),
SizedBox(height: 4.0.h()),
Text(
TenderDetailsStrings.tenderNoExperience,
style: TextStyle(
fontSize: 14.0.sp(),
color: AppColors.grey70,
fontWeight: FontWeight.w400,
),
),
],
),
),
],
),
],
),
);
}
}