home logic added

This commit is contained in:
amirrezaghabeli
2025-08-09 14:15:02 +03:30
parent 99b6bbb13f
commit 1fdfc52297
22 changed files with 1627 additions and 112 deletions
+12 -8
View File
@@ -1,12 +1,14 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:tm_app/data/services/model/home/tender/tender_model.dart';
import '../../core/constants/assets.dart';
import '../../core/theme/colors.dart';
import '../../core/utils/size_config.dart';
class TendersListItem extends StatelessWidget {
const TendersListItem({super.key});
const TendersListItem({required this.tender, super.key});
final TenderModel tender;
@override
Widget build(BuildContext context) {
@@ -17,7 +19,7 @@ class TendersListItem extends StatelessWidget {
),
margin: EdgeInsetsDirectional.only(end: 16.0.w()),
width: 320.0.w(),
height: 309.0.h(),
height: 280.0.h(),
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.0.w(), vertical: 16.0.h()),
child: Column(
@@ -26,7 +28,7 @@ class TendersListItem extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'2025-05-21',
tender.createdTime ?? '',
style: TextStyle(
fontSize: 12.0.sp(),
fontWeight: FontWeight.w400,
@@ -42,7 +44,7 @@ class TendersListItem extends StatelessWidget {
),
alignment: Alignment.center,
child: Text(
'Completed',
tender.status ?? '',
style: TextStyle(
fontSize: 12.0.sp(),
fontWeight: FontWeight.w500,
@@ -54,7 +56,7 @@ class TendersListItem extends StatelessWidget {
),
SizedBox(height: 12.0.h()),
Text(
'Lorem ipsum dolor sit amet consectetur. Sed mi tortor eu purus senectus.',
tender.title ?? '',
style: TextStyle(
fontSize: 16.0.sp(),
fontWeight: FontWeight.w600,
@@ -63,7 +65,9 @@ class TendersListItem extends StatelessWidget {
),
SizedBox(height: 8.0.h()),
Text(
'Lorem ipsum dolor sit amet consectetur. Volutpat velit tincidunt amet diam. Placerat congue ut Sed facilisis faucibus porttitor. Proin suspendisse eu euismod sit lorem quis. Suscipit ...',
tender.description ?? '',
maxLines: 3,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14.0.sp(),
fontWeight: FontWeight.w400,
@@ -76,7 +80,7 @@ class TendersListItem extends StatelessWidget {
SvgPicture.asset(AssetsManager.location),
SizedBox(width: 1.0.w()),
Text(
'Location',
tender.location ?? '',
style: TextStyle(
fontSize: 12.0.sp(),
fontWeight: FontWeight.w400,
@@ -99,7 +103,7 @@ class TendersListItem extends StatelessWidget {
),
alignment: Alignment.center,
child: Text(
'Self Control',
tender.type ?? '',
style: TextStyle(
fontSize: 12.0.sp(),
fontWeight: FontWeight.w500,