toMap method
Implementation
Map<String, dynamic> toMap() {
List units =
List.generate(this.units.length, (index) => this.units[index].toMap());
List exposures = List.generate(
this.exposures.length, (index) => this.exposures[index].toMap());
List goals =
List.generate(this.goals.length, (index) => this.goals[index].toMap());
List attributes = List.generate(
this.attributes.length, (index) => this.attributes[index].toMap());
return {
"hashed": hashed,
"units": units,
"publishedAt": publishedAt,
"exposures": exposures,
"goals": goals,
"attributes": attributes,
};
}