| _listSupplyUsingDetail.add(usingSupplyDetail); | _listSupplyUsingDetail.add(usingSupplyDetail); | ||||
| }); | }); | ||||
| _requestActivity.tbSuppliesUsingDetailsDTOs = _listSupplyUsingDetail; | _requestActivity.tbSuppliesUsingDetailsDTOs = _listSupplyUsingDetail; | ||||
| } else if (widget.activityType == 'ACTIVE_TYPE_FERTILIZE' || | |||||
| widget.activityType == 'ACTIVE_TYPE_SPRAYING_PESTICIDES') { | |||||
| var _listSupplyUsingDetail = <TbSuppliesUsingDetailsDTOs>[]; | |||||
| _supplyUsings.forEach((element) { | |||||
| var usingSupplyDetail = TbSuppliesUsingDetailsDTOs() | |||||
| ..tbSuppliesInWarehouseId = element.tbSuppliesInWarehouseId | |||||
| ..dosage = element.dosage | |||||
| ..quantity = element.quantity | |||||
| ..howToUse = element.howToUse ?? '' | |||||
| ..tbEquipmentOfCustomerId = element.equipmentOfCustomerId; | |||||
| _listSupplyUsingDetail.add(usingSupplyDetail); | |||||
| }); | |||||
| _requestActivity.tbSuppliesUsingDetailsDTOs = _listSupplyUsingDetail; | |||||
| } | } | ||||
| //convert data to json | //convert data to json | ||||
| var activityCommonData = | var activityCommonData = | ||||
| height: 16, | height: 16, | ||||
| color: Colors.grey[200], | color: Colors.grey[200], | ||||
| ), | ), | ||||
| WidgetDungSupply(currentItems: [], onChangeSupplies: (value) {}), | |||||
| WidgetDungSupply( | |||||
| currentItems: [], | |||||
| onChangeSupplies: (value) { | |||||
| _supplyUsings = value; | |||||
| }), | |||||
| ], | ], | ||||
| ); | ); | ||||
| break; | break; | ||||
| color: Colors.grey[200], | color: Colors.grey[200], | ||||
| ), | ), | ||||
| WidgetSprayingSupply( | WidgetSprayingSupply( | ||||
| currentItems: [], onChangeSupplies: (value) {}), | |||||
| currentItems: [], | |||||
| onChangeSupplies: (value) { | |||||
| _supplyUsings = value; | |||||
| }), | |||||
| ], | ], | ||||
| ); | ); | ||||
| break; | break; |