import 'package:farm_tpf/custom_model/Supply.dart'; import 'package:get/get.dart'; class ChangeSupply extends GetxController { Supply currentSupply; int selectedSupplyId; String selectedSupplyName; void initValue() { currentSupply = Supply(); selectedSupplyId = -1; update(); } void change(Supply supply) { currentSupply = supply; selectedSupplyId = supply.id; selectedSupplyName = supply.tbSuppliesName; update(); } void changeByIdAndName(int supplyId, String supplyName) { selectedSupplyId = supplyId; selectedSupplyName = supplyName; update(); } }