import 'package:farm_tpf/models/Supply.dart'; import 'package:get/get.dart'; class ChangeSupply extends GetxController { Supply currentSupply; int selectedSupplyId; void initValue() { currentSupply = Supply(); selectedSupplyId = -1; update(); } void change(Supply supply) { currentSupply = supply; selectedSupplyId = supply.id; update(); } void changeById(int supplyId) { selectedSupplyId = supplyId; update(); } }