fix : ui fix after release 1.3.3

This commit is contained in:
2025-07-16 18:31:47 +03:30
parent 3566e5820d
commit c28a0e6630
22 changed files with 229 additions and 203 deletions

View File

@@ -20,7 +20,7 @@ class WidelyUsedWidget extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('پر کاربرد ها', textAlign: TextAlign.right, style: AppFonts.yekan16),
ObxValue((data) {
/* ObxValue((data) {
return GestureDetector(
onTap: () {
controller.toggleType();
@@ -37,32 +37,73 @@ class WidelyUsedWidget extends StatelessWidget {
colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
),
);
}, controller.type),
}, controller.type)*/
],
),
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 2.0, vertical: 2),
child: ObxValue((data) {
return Wrap(
spacing: 4,
runSpacing: 18,
children: [
widelyUsed(
title: 'خرید خارج استان',
isOnEdit: controller.type.value == WidelyUsedType.edit,
iconPath: Assets.vec.truckFastSvg.path,
onTap: () async {
controller.rootLogic.currentPage.value = 0;
controller.rootLogic.currentPage.refresh();
await Future.delayed(Duration(milliseconds: 100));
Get.toNamed(ChickenRoutes.buysOutOfProvince, id: 0);
},
),
],
);
}, controller.type),
child: Wrap(
spacing: 15,
runSpacing: 8,
children: [
widelyUsed(
title: 'خرید خارج استان',
iconPath: Assets.vec.truckFastSvg.path,
isOnEdit: false,
cardColor: AppColor.greenLightActive,
labelColor: AppColor.greenNormal,
textColor: AppColor.greenDarkHover,
onTap: () async {
controller.rootLogic.currentPage.value = 0;
controller.rootLogic.currentPage.refresh();
await Future.delayed(Duration(milliseconds: 100));
Get.toNamed(ChickenRoutes.buysOutOfProvince, id: 0);
},
),
widelyUsed(
title: 'خرید داخل استان',
iconPath: Assets.vec.cubeSvg.path,
cardColor: AppColor.greenLightActive,
labelColor: AppColor.greenNormal,
textColor: AppColor.greenDarkHover,
onTap: () async {
controller.rootLogic.currentPage.value = 0;
controller.rootLogic.currentPage.refresh();
await Future.delayed(Duration(milliseconds: 100));
Get.toNamed(ChickenRoutes.buysInProvince, id: 0);
},
isOnEdit: false,
),
widelyUsed(
title: 'فروش خارج استان',
iconPath: Assets.vec.truckFastSvg.path,
isOnEdit: false,
onTap: () async {
controller.rootLogic.currentPage.value = 1;
controller.rootLogic.currentPage.refresh();
await Future.delayed(Duration(milliseconds: 100));
Get.toNamed(ChickenRoutes.salesOutOfProvince, id: 1);
},
),
widelyUsed(
title: 'فروش داخل استان',
iconPath: Assets.vec.cubeSvg.path,
isOnEdit: false,
onTap: () async {
controller.rootLogic.currentPage.value = 1;
controller.rootLogic.currentPage.refresh();
await Future.delayed(Duration(milliseconds: 100));
Get.toNamed(ChickenRoutes.salesInProvince, id: 1);
},
),
],
),
),
],
);
@@ -73,6 +114,9 @@ class WidelyUsedWidget extends StatelessWidget {
required String iconPath,
required VoidCallback onTap,
required bool isOnEdit,
Color? cardColor,
Color? labelColor,
Color? textColor,
}) {
return GestureDetector(
onTap: !isOnEdit ? onTap : null,
@@ -89,14 +133,14 @@ class WidelyUsedWidget extends StatelessWidget {
height: 48,
padding: EdgeInsets.all(4),
decoration: ShapeDecoration(
color: Color(0xFFBECDFF),
color: cardColor ?? Color(0xFFBECDFF),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
),
child: Container(
width: 40,
height: 40,
decoration: ShapeDecoration(
color: AppColor.blueNormal,
color: labelColor ?? AppColor.blueNormal,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
),
child: SvgGenImage.vec(iconPath).svg(
@@ -146,7 +190,7 @@ class WidelyUsedWidget extends StatelessWidget {
),
],
),
Text(title, style: AppFonts.yekan10.copyWith(color: AppColor.blueNormal)),
Text(title, style: AppFonts.yekan10.copyWith(color: textColor ?? AppColor.blueNormal)),
],
),
);