toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['inviteID'] = this.inviteID ?? Uuid().v4().toString();
  if (this.groupID != null) data['groupID'] = this.groupID;
  if (this.inviter != null) data['inviter'] = this.inviter;
  if (this.inviteeList != null) data['inviteeList'] = this.inviteeList;
  if (this.data != null) data['data'] = this.data;
  if (this.timeout != null) data['timeout'] = this.timeout;
  if (this.actionType != null)
    data['actionType'] = SignalingActionTypeTool.toInt(this.actionType!);
  if (this.businessID != null) data['businessID'] = this.businessID;
  if (this.onlineUserOnly != null)
    data['onlineUserOnly'] = this.onlineUserOnly;
  return data;
}