class DeviceControlModel { String? deviceId; String? code; dynamic value; DeviceControlModel({ required this.deviceId, required this.code, required this.value, }); factory DeviceControlModel.fromJson(Map json) { print('json: $json'); return DeviceControlModel( deviceId: json['deviceUuid'], code: json['code'], value: json['value'], ); } Map toJson() { return { 'deviceUuid': deviceId, 'code': code, 'value': value, }; } }