toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['type'] = this.type;
  data['isDeleted'] = this.isDeleted;
  data['createdAt'] = this.createdAt;
  data['editedAt'] = this.editedAt;
  data['channelSegment'] = this.channelSegment;
  data['updatedAt'] = this.updatedAt;
  data['childrenNumber'] = this.childrenNumber;
  data['channelId'] = this.channelId;
  data['userId'] = this.userId;
  data['messageId'] = this.messageId;
  data['flagCount'] = this.flagCount;
  data['reactionsCount'] = this.reactionsCount;
  if (this.reactions != null) {
    data['reactions'] = this.reactions!.toJson();
  }
  if (this.data != null) {
    data['data'] = this.data!.toJson();
  }
  return data;
}