toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
  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.projectPath != null) {
    json[r'projectPath'] = this.projectPath;
  } else {
    json[r'projectPath'] = null;
  }
  if (this.icon != null) {
    json[r'icon'] = this.icon;
  } else {
    json[r'icon'] = null;
  }
  if (this.color != null) {
    json[r'color'] = this.color;
  } else {
    json[r'color'] = null;
  }
  if (this.createdAt != null) {
    json[r'createdAt'] = this.createdAt!.toUtc().toIso8601String();
  } else {
    json[r'createdAt'] = null;
  }
  if (this.updatedAt != null) {
    json[r'updatedAt'] = this.updatedAt!.toUtc().toIso8601String();
  } else {
    json[r'updatedAt'] = null;
  }
  return json;
}