toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.name != null) {
    json[r'name'] = this.name;
  } else {
    json[r'name'] = null;
  }
  if (this.number != null) {
    json[r'number'] = this.number;
  } else {
    json[r'number'] = null;
  }
  if (this.startDate != null) {
    json[r'start_date'] = this.startDate!.toUtc().toIso8601String();
  } else {
    json[r'start_date'] = null;
  }
  json[r'badges'] = this.badges;
  json[r'skins'] = this.skins;
  return json;
}