Merge pull request 'Fixed size icon and web desktop design' (#95) from icon_size into main

Reviewed-on: https://repo.ravanertebat.com/TM/tm_app/pulls/95
This commit is contained in:
a.ghabeli
2025-09-05 12:58:23 +03:30
6 changed files with 74 additions and 36 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ class TenderCard extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SvgPicture.asset(iconPath),
SvgPicture.asset(iconPath,width: 32.0.w(),height: 32.0.h(),),
SizedBox(height: 4.0.h()),
Text(
title,
@@ -86,26 +86,9 @@ class _LikedTendersDesktopPageState extends State<LikedTendersDesktopPage> {
final item = feedback[index];
return Padding(
padding: EdgeInsets.only(bottom: 20.0.h()),
child: Dismissible(
key: ValueKey(item.tenderId ?? index),
direction: DismissDirection.endToStart,
background: Container(
alignment: Alignment.centerRight,
padding: EdgeInsets.symmetric(
horizontal: 20.0.w(),
),
child: SvgPicture.asset(
AssetsManager.trash,
),
),
onDismissed: (_) {
if (item.tenderId != null) {
viewModel.removeTenderById(
item.tenderId!,
);
}
},
child: LikedListItem(tender: item.tender!),
child: LikedListItem(
tender: item.tender!,
isDesktop: true,
),
);
},
@@ -128,7 +111,7 @@ class _LikedTendersDesktopPageState extends State<LikedTendersDesktopPage> {
),
SizedBox(width: 10.0.w()),
GestureDetector(
InkWell(
onTap: () async {
final selectedPage = await showDialog<int>(
context: context,
@@ -103,7 +103,7 @@ class _LikedTendersMobilePageState extends State<LikedTendersMobilePage> {
padding: EdgeInsets.symmetric(
horizontal: 20.0.w(),
),
child: SvgPicture.asset(AssetsManager.trash),
child: SvgPicture.asset(AssetsManager.trash,width: 32.0.w(),height: 32.0.h(),),
),
onDismissed: (_) {
if (item.tenderId != null) {
@@ -103,6 +103,7 @@ class _LikedTendersTabletPageState extends State<LikedTendersTabletPage> {
),
child: SvgPicture.asset(
AssetsManager.trash,
width: 32.0.w(),height: 32.0.h(),
),
),
onDismissed: (_) {
@@ -135,7 +136,7 @@ class _LikedTendersTabletPageState extends State<LikedTendersTabletPage> {
),
SizedBox(width: 10.0.w()),
GestureDetector(
InkWell(
onTap: () async {
final selectedPage = await showDialog<int>(
context: context,
@@ -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()),
@@ -70,8 +70,8 @@ class TenderActionButtonsRow extends StatelessWidget {
child: Column(
children: [
Container(
width: 32.0.w(),
height: 32.0.w(),
width: 24.0.w(),
height: 24.0.w(),
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(
@@ -161,8 +161,8 @@ class TenderActionButtonsRow extends StatelessWidget {
child: Column(
children: [
Container(
width: 32.0.w(),
height: 32.0.w(),
width: 24.0.w(),
height: 24.0.w(),
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(
@@ -215,8 +215,8 @@ class TenderActionButtonsRow extends StatelessWidget {
child: Column(
children: [
SvgPicture.asset(
width: 32.0.w(),
height: 32.0.w(),
width: 24.0.w(),
height: 24.0.w(),
fit: BoxFit.cover,
AssetsManager.dislike,
colorFilter: ColorFilter.mode(
@@ -259,8 +259,8 @@ class TenderActionButtonsRow extends StatelessWidget {
child: Column(
children: [
SvgPicture.asset(
width: 32.0.w(),
height: 32.0.w(),
width: 24.0.w(),
height: 24.0.w(),
fit: BoxFit.cover,
AssetsManager.like,
colorFilter: ColorFilter.mode(