✨ added your tenders screen
This commit is contained in:
@@ -0,0 +1,190 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
|
||||
import '../../../core/constants/assets.dart';
|
||||
import '../../../core/constants/colors.dart';
|
||||
import '../../../core/utils/size_config.dart';
|
||||
|
||||
class TenderCard extends StatelessWidget {
|
||||
final String date;
|
||||
final String title;
|
||||
final String description;
|
||||
final String location;
|
||||
final String countryFlag;
|
||||
final String status;
|
||||
final String projectStatus;
|
||||
final Color? backgroundColor;
|
||||
final Color? borderColor;
|
||||
final String? statusIcon;
|
||||
final Color? statusCardColor;
|
||||
final Color? statusTextColor;
|
||||
|
||||
const TenderCard({
|
||||
required this.date,
|
||||
required this.title,
|
||||
required this.description,
|
||||
required this.location,
|
||||
this.countryFlag = 'assets/icons/SE.png',
|
||||
this.status = 'Completed',
|
||||
this.projectStatus = 'Self Control',
|
||||
this.backgroundColor,
|
||||
this.borderColor,
|
||||
this.statusIcon,
|
||||
this.statusCardColor,
|
||||
this.statusTextColor,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
margin: EdgeInsets.only(
|
||||
left: 24.0.w(),
|
||||
right: 24.0.w(),
|
||||
bottom: 24.0.h(),
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: backgroundColor ?? AppColors.grey0,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: borderColor ?? AppColors.borderColor),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(16.0.w()),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Top section with date and status
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
// Date
|
||||
Text(
|
||||
date,
|
||||
style: TextStyle(
|
||||
color: AppColors.grey60,
|
||||
fontSize: 12.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
// Completed status badge
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 16.0.w(),
|
||||
vertical: 4.0.h(),
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: statusCardColor ?? AppColors.gren20,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
if (statusIcon != null)
|
||||
SvgPicture.asset(
|
||||
statusIcon!,
|
||||
width: 16.0.w(),
|
||||
height: 16.0.h(),
|
||||
),
|
||||
SizedBox(width: 4.0.w()),
|
||||
Text(
|
||||
status,
|
||||
style: TextStyle(
|
||||
color: statusTextColor ?? AppColors.gren30,
|
||||
fontSize: 12.0.sp(),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 12.0.h()),
|
||||
|
||||
// Title
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
color: AppColors.grey80,
|
||||
fontSize: 16.0.sp(),
|
||||
fontWeight: FontWeight.w600,
|
||||
height: 1.3,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8.0.h()),
|
||||
|
||||
// Description
|
||||
Text(
|
||||
description,
|
||||
style: TextStyle(
|
||||
color: AppColors.grey70,
|
||||
fontSize: 14.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
height: 1.4,
|
||||
),
|
||||
maxLines: 3,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
SizedBox(height: 24.0.h()),
|
||||
|
||||
// Bottom section with location and action button
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
// Location with flag
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
AssetsManager.location,
|
||||
width: 16.0.w(),
|
||||
height: 16.0.h(),
|
||||
),
|
||||
SizedBox(width: 4.0.w()),
|
||||
Text(
|
||||
location,
|
||||
style: TextStyle(
|
||||
color: AppColors.grey80,
|
||||
fontSize: 12.0.sp(),
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 8.0.w()),
|
||||
// Country flag
|
||||
Image.asset(
|
||||
countryFlag,
|
||||
width: 32.0.w(),
|
||||
height: 21.0.h(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
// Self Control button
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 16.0.w(),
|
||||
vertical: 4.0.h(),
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.grey20,
|
||||
borderRadius: BorderRadius.circular(88),
|
||||
border: Border.all(color: AppColors.grey40),
|
||||
),
|
||||
child: Text(
|
||||
projectStatus,
|
||||
style: TextStyle(
|
||||
color: AppColors.grey60,
|
||||
fontSize: 12.0.sp(),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user