fix : saleOrBuyItemCard color
This commit is contained in:
@@ -11,7 +11,7 @@ Future<void> setupChickenDI() async {
|
||||
() => AppInterceptor(
|
||||
refreshTokenCallback: () async {},
|
||||
saveTokenCallback: (String newToken) async {
|
||||
await tokenService.saveAccessToken(newToken); // ذخیره توکن جدید
|
||||
await tokenService.saveAccessToken(newToken);
|
||||
},
|
||||
clearTokenCallback: () async {
|
||||
await tokenService.deleteTokens();
|
||||
|
||||
@@ -23,15 +23,17 @@ class BuyPage extends GetView<BuyLogic> {
|
||||
spacing: 14.w,
|
||||
children: [
|
||||
saleOrBuyItemCard(
|
||||
title: 'داخل استان',
|
||||
title: 'خرید داخل استان',
|
||||
iconPath: Assets.vec.cubeSvg.path,
|
||||
color: AppColor.greenNormalActive,
|
||||
onTap: () {
|
||||
Get.toNamed(ChickenRoutes.buysInProvince, id: 0);
|
||||
},
|
||||
),
|
||||
saleOrBuyItemCard(
|
||||
title: 'خارج استان',
|
||||
title: 'خرید خارج استان',
|
||||
iconPath: Assets.vec.truckFastSvg.path,
|
||||
color: AppColor.greenNormalActive,
|
||||
onTap: () {
|
||||
Get.toNamed(ChickenRoutes.buysOutOfProvince, id: 0);
|
||||
},
|
||||
|
||||
@@ -24,14 +24,14 @@ class SalePage extends GetView<SaleLogic> {
|
||||
spacing: 14.w,
|
||||
children: [
|
||||
saleOrBuyItemCard(
|
||||
title: 'داخل استان',
|
||||
title: 'فروش داخل استان',
|
||||
iconPath: Assets.vec.cubeSvg.path,
|
||||
onTap: () {
|
||||
Get.toNamed(ChickenRoutes.salesInProvince, id: 1);
|
||||
},
|
||||
),
|
||||
saleOrBuyItemCard(
|
||||
title: 'خارج استان',
|
||||
title: 'فروش خارج استان',
|
||||
iconPath: Assets.vec.truckFastSvg.path,
|
||||
onTap: () {
|
||||
Get.toNamed(ChickenRoutes.salesOutOfProvince, id: 1);
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
Widget saleOrBuyItemCard({String? title, String? iconPath, required VoidCallback onTap}) {
|
||||
Widget saleOrBuyItemCard({
|
||||
String? title,
|
||||
String? iconPath,
|
||||
required VoidCallback onTap,
|
||||
Color? color,
|
||||
}) {
|
||||
return InkWell(
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
onTap: onTap,
|
||||
child: Card(
|
||||
color: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(color: AppColor.blueNormal, width: 1.0.w),
|
||||
side: BorderSide(color: color ?? AppColor.blueNormal, width: 1.0.w),
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
),
|
||||
child: Container(
|
||||
@@ -23,10 +28,14 @@ Widget saleOrBuyItemCard({String? title, String? iconPath, required VoidCallback
|
||||
SvgGenImage.vec(iconPath).svg(
|
||||
width: 64.w,
|
||||
height: 64.h,
|
||||
colorFilter: const ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
|
||||
colorFilter: ColorFilter.mode(color ?? AppColor.blueNormal, BlendMode.srcIn),
|
||||
),
|
||||
SizedBox(height: 12.h),
|
||||
if (title != null) Text(title, style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal)),
|
||||
if (title != null)
|
||||
Text(
|
||||
title,
|
||||
style: AppFonts.yekan16Bold.copyWith(color: color ?? AppColor.blueNormal),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user