class ToDeviceEvent { String sender; String type; Map content; ToDeviceEvent({this.sender, this.type, this.content}); ToDeviceEvent.fromJson(Map json) { sender = json['sender']; type = json['type']; content = json['content'] != null ? Map.from(json['content']) : null; } Map toJson() { var map = {}; final data = map; data['sender'] = sender; data['type'] = type; if (content != null) { data['content'] = content; } return data; } }