toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
  if (this.provider != null) {
    json[r'provider'] = this.provider;
  } else {
    json[r'provider'] = null;
  }
  if (this.accountId != null) {
    json[r'accountId'] = this.accountId;
  } else {
    json[r'accountId'] = null;
  }
    json[r'name'] = this.name;
    json[r'type'] = this.type;
  if (this.description != null) {
    json[r'description'] = this.description;
  } else {
    json[r'description'] = null;
  }
  if (this.topic != null) {
    json[r'topic'] = this.topic;
  } else {
    json[r'topic'] = null;
  }
    json[r'isMember'] = this.isMember;
    json[r'isArchived'] = this.isArchived;
  if (this.memberCount != null) {
    json[r'memberCount'] = this.memberCount;
  } else {
    json[r'memberCount'] = null;
  }
  if (this.createdAt != null) {
    json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String();
  } else {
    json[r'createdAt'] = null;
  }
  return json;
}