toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var id = this.id;
  var self = this.self;
  var name = this.name;
  var type = this.type;
  var admins = this.admins;
  var location = this.location;
  var canEdit = this.canEdit;
  var isPrivate = this.isPrivate;
  var favourite = this.favourite;

  final json = <String, Object?>{};
  if (id != null) {
    json[r'id'] = id;
  }
  if (self != null) {
    json[r'self'] = self;
  }
  if (name != null) {
    json[r'name'] = name;
  }
  if (type != null) {
    json[r'type'] = type;
  }
  if (admins != null) {
    json[r'admins'] = admins;
  }
  if (location != null) {
    json[r'location'] = location.toJson();
  }
  json[r'canEdit'] = canEdit;
  json[r'isPrivate'] = isPrivate;
  json[r'favourite'] = favourite;
  return json;
}