toJson method Null safety
Converts the FeatureCollection to a GEOJSON FeatureCollection object.
Implementation
Map<String, dynamic> toJson() {
return {
'type': 'FeatureCollection',
'features': features.map((f) => f.toJson()).toList(),
};
}