toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  if (this.attachment != null) {
    data['attachment'] = this.attachment.toJson();
  }
  data['channel'] = this.channel;
  data['sent_timestamp'] = this.sentTimestamp;
  data['user'] = this.user;
  data['to'] = this.to;
  data['sessionId'] = this.sessionId;
  data['type'] = this.type;
  data['_id'] = this.sId;
  return data;
}