class EventDevice { final String? code; final DateTime? eventTime; final String? value; EventDevice({ this.code, this.eventTime, this.value, }); EventDevice.fromJson(Map json) : code = json['code'] as String?, eventTime = json['eventTime'] , value = json['value'] as String?; Map toJson() => { 'code': code, 'eventTime': eventTime, 'value': value, }; }