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.description != null) {
    json[r'description'] = this.description;
  } else {
    json[r'description'] = null;
  }
  if (this.tags != null) {
    json[r'tags'] = this.tags;
  } else {
    json[r'tags'] = null;
  }
  if (this.expiresAt != null) {
    json[r'expiresAt'] = this.expiresAt!.toUtc().toIso8601String();
  } else {
    json[r'expiresAt'] = null;
  }
  if (this.favourite != null) {
    json[r'favourite'] = this.favourite;
  } else {
    json[r'favourite'] = null;
  }
  return json;
}