You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- import 'package:farm_tpf/custom_model/Device.dart';
- import 'package:get/get.dart';
-
- class ChangeDevice extends GetxController {
- Device currentDevice;
- int selectedDeviceId;
- String selectedDeviceName;
-
- void initValue() {
- currentDevice = Device();
- selectedDeviceName = "";
- selectedDeviceId = -1;
- update();
- }
-
- void change(Device device) {
- currentDevice = device;
- selectedDeviceId = device.id;
- selectedDeviceName = device.name;
- update();
- }
-
- void changeByIdAndName(int id, String name) {
- selectedDeviceId = id;
- selectedDeviceName = name;
- update();
- }
- }
|