Fixed size icon and web desktop design

This commit is contained in:
llsajjad
2025-09-05 12:33:48 +03:30
parent 7ed240b8df
commit e67b021f26
6 changed files with 74 additions and 36 deletions
@@ -1,18 +1,26 @@
import 'package:country_flags/country_flags.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:provider/provider.dart';
import 'package:tm_app/core/constants/assets.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/view_models/liked_tenders_view_model.dart';
import 'package:tm_app/views/home/strings/home_strings.dart';
class LikedListItem extends StatelessWidget {
const LikedListItem({required this.tender, super.key});
const LikedListItem({
required this.tender,
super.key,
this.isDesktop = false,
});
final TenderData tender;
final bool isDesktop;
@override
Widget build(BuildContext context) {
final viewModel = context.read<LikedTendersViewModel>();
return Container(
decoration: BoxDecoration(
color: AppColors.cardBackground,
@@ -28,7 +36,53 @@ class LikedListItem extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 10.0.h()),
Container(
isDesktop ?
Row(
children: [
Expanded(
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 10.0.w(),
vertical: 5.0.h(),
),
decoration: BoxDecoration(
color: AppColors.primary30,
borderRadius: BorderRadius.circular(4),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'${HomeStrings.tenderDeadline} :',
style: TextStyle(
fontSize: 15.0.sp(),
fontWeight: FontWeight.w500,
color: AppColors.textBlue,
),
),
Text(
timeConvertor(tender.tenderDeadline!),
style: TextStyle(
fontSize: 14.0.sp(),
fontWeight: FontWeight.w500,
color: AppColors.grey80,
),
),
],
),
),
),
SizedBox(width: 8.0.w()),
InkWell(
child: SvgPicture.asset(AssetsManager.trash,width: 32.0.w(),height: 32.0.h(),),
onTap: () {
if (tender.id != null) {
viewModel.removeTenderById(tender.id!);
}
},
),
],
) : Container(
padding: EdgeInsets.symmetric(
horizontal: 10.0.w(),
vertical: 5.0.h(),
@@ -110,7 +164,7 @@ class LikedListItem extends StatelessWidget {
Spacer(),
Container(
width: 32.0.w(),
height: 32.0.w(),
height: 32.0.h(),
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(color: AppColors.grey60, width: 1.5.w()),
@@ -121,7 +175,7 @@ class LikedListItem extends StatelessWidget {
SizedBox(width: 30.0.w()),
Container(
width: 32.0.w(),
height: 32.0.w(),
height: 32.0.h(),
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(color: AppColors.grey60, width: 1.5.w()),