toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> map = <String, dynamic>{};
if (this.suggestedLocations != null) {
map['suggestedLocations'] =
List.generate(this.suggestedLocations!.length, (index) {
return this.suggestedLocations![index].toJson();
});
}
if (this.suggestedSearches != null) {
map['suggestedSearches'] =
List.generate(this.suggestedSearches!.length, (index) {
return this.suggestedSearches![index].toJson();
});
}
if (this.userAddedLocations != null) {
map['userAddedLocations'] =
List.generate(this.userAddedLocations!.length, (index) {
return this.userAddedLocations![index].toJson();
});
}
return map;
}