fix :kiss and dray
This commit is contained in:
@@ -5,6 +5,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_province_city_model.dart';
|
import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_province_city_model.dart';
|
||||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||||
|
import 'package:rasadyar_chicken/data/models/response/steward_free_bar/steward_free_bar.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/list_item/list_item.dart';
|
import 'package:rasadyar_chicken/presentation/widget/list_item/list_item.dart';
|
||||||
import 'package:rasadyar_chicken/presentation/widget/list_row_item.dart';
|
import 'package:rasadyar_chicken/presentation/widget/list_row_item.dart';
|
||||||
@@ -35,89 +36,34 @@ class BuyOutOfProvincePage extends GetView<BuyOutOfProvinceLogic> {
|
|||||||
return ListItem2(
|
return ListItem2(
|
||||||
selected: val.contains(index),
|
selected: val.contains(index),
|
||||||
onTap: () => controller.isExpandedList.toggle(index),
|
onTap: () => controller.isExpandedList.toggle(index),
|
||||||
|
|
||||||
index: index,
|
index: index,
|
||||||
child: Row(
|
child: itemListWidget(item),
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
secondChild: itemListExpandedWidget(item),
|
||||||
children: [
|
labelColor: AppColor.blueLight,
|
||||||
SizedBox(width: 20),
|
labelIcon: Assets.vec.truckFastOutlinedSvg.path,
|
||||||
Expanded(
|
);
|
||||||
flex: 2,
|
}, controller.isExpandedList);
|
||||||
child: Column(
|
},
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
itemCount: data.value.data?.length ?? 0,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
separatorBuilder: (context, index) => SizedBox(height: 8.h),
|
||||||
spacing: 3,
|
onLoadMore: () async {},
|
||||||
children: [
|
);
|
||||||
Text(
|
}, controller.purchaseOutOfProvinceList),
|
||||||
item.killHouseName ?? 'N/A',
|
|
||||||
textAlign: TextAlign.start,
|
|
||||||
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
item.date?.formattedJalaliDate ?? 'N/A',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
floatingActionButton: RFab.add(
|
||||||
|
onPressed: () {
|
||||||
|
Get.bottomSheet(addPurchasedInformationBottomSheet(), isScrollControlled: true);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
),
|
floatingActionButtonLocation: FloatingActionButtonLocation.startFloat,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Expanded(
|
Container itemListExpandedWidget(StewardFreeBar item) {
|
||||||
flex: 3,
|
return Container(
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
spacing: 3,
|
|
||||||
children: [
|
|
||||||
Visibility(
|
|
||||||
visible: item.product?.name?.contains('مرغ گرم') ?? false,
|
|
||||||
child: Assets.vec.hotChickenSvg.svg(
|
|
||||||
width: 24,
|
|
||||||
height: 24,
|
|
||||||
colorFilter: ColorFilter.mode(
|
|
||||||
AppColor.blueNormal,
|
|
||||||
BlendMode.srcIn,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'${item.weightOfCarcasses?.separatedByComma}kg',
|
|
||||||
textAlign: TextAlign.left,
|
|
||||||
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
|
|
||||||
SizedBox(height: 2),
|
|
||||||
|
|
||||||
Text(
|
|
||||||
'${item.province}',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: Assets.vec.scanSvg.svg(
|
|
||||||
width: 32.w,
|
|
||||||
height: 32.h,
|
|
||||||
colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
secondChild: Container(
|
|
||||||
padding: EdgeInsets.all(8),
|
padding: EdgeInsets.all(8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.circular(8),
|
|
||||||
),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
spacing: 8,
|
spacing: 8,
|
||||||
children: [
|
children: [
|
||||||
@@ -201,9 +147,7 @@ class BuyOutOfProvincePage extends GetView<BuyOutOfProvinceLogic> {
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'بارنامه',
|
'بارنامه',
|
||||||
style: AppFonts.yekan16Bold.copyWith(
|
style: AppFonts.yekan16Bold.copyWith(color: AppColor.darkGreyDarkHover),
|
||||||
color: AppColor.darkGreyDarkHover,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
|
||||||
Image.network(
|
Image.network(
|
||||||
@@ -253,8 +197,7 @@ class BuyOutOfProvincePage extends GetView<BuyOutOfProvinceLogic> {
|
|||||||
height: 40.h,
|
height: 40.h,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
buildDeleteDialog(
|
buildDeleteDialog(
|
||||||
onConfirm: () =>
|
onConfirm: () => controller.deleteStewardPurchaseOutOfProvince(item.key!),
|
||||||
controller.deleteStewardPurchaseOutOfProvince(item.key!),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
borderColor: AppColor.redNormal,
|
borderColor: AppColor.redNormal,
|
||||||
@@ -263,25 +206,80 @@ class BuyOutOfProvincePage extends GetView<BuyOutOfProvinceLogic> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Row itemListWidget(StewardFreeBar item) {
|
||||||
|
return Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
children: [
|
||||||
|
SizedBox(width: 20),
|
||||||
|
Expanded(
|
||||||
|
flex: 2,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
spacing: 3,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
item.killHouseName ?? 'N/A',
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
||||||
),
|
),
|
||||||
labelColor: AppColor.blueLight,
|
Text(
|
||||||
labelIcon: Assets.vec.truckFastOutlinedSvg.path,
|
item.date?.formattedJalaliDate ?? 'N/A',
|
||||||
);
|
textAlign: TextAlign.center,
|
||||||
}, controller.isExpandedList);
|
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark),
|
||||||
},
|
|
||||||
itemCount: data.value.data?.length ?? 0,
|
|
||||||
separatorBuilder: (context, index) => SizedBox(height: 8.h),
|
|
||||||
onLoadMore: () async {},
|
|
||||||
);
|
|
||||||
}, controller.purchaseOutOfProvinceList),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
floatingActionButton: RFab.add(
|
|
||||||
onPressed: () {
|
|
||||||
Get.bottomSheet(addPurchasedInformationBottomSheet(), isScrollControlled: true);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
floatingActionButtonLocation: FloatingActionButtonLocation.startFloat,
|
),
|
||||||
|
Expanded(
|
||||||
|
flex: 3,
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
spacing: 3,
|
||||||
|
children: [
|
||||||
|
Visibility(
|
||||||
|
visible: item.product?.name?.contains('مرغ گرم') ?? false,
|
||||||
|
child: Assets.vec.hotChickenSvg.svg(
|
||||||
|
width: 24,
|
||||||
|
height: 24,
|
||||||
|
colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'${item.weightOfCarcasses?.separatedByComma}kg',
|
||||||
|
textAlign: TextAlign.left,
|
||||||
|
style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(height: 2),
|
||||||
|
|
||||||
|
Text(
|
||||||
|
'${item.province}',
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: AppFonts.yekan12.copyWith(color: AppColor.bgDark),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: Assets.vec.scanSvg.svg(
|
||||||
|
width: 32.w,
|
||||||
|
height: 32.h,
|
||||||
|
colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user