fromJson static method
Returns a new FeatureGeometry instance and imports its values from
json
if it's non-null, null if json
is null.
Implementation
static FeatureGeometry? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return FeatureGeometry(
type: FeatureGeometryTypeEnum.fromJson(json[r'type']),
coordinates:
List.from(json[r'coordinates'] ?? []).map<List<List<num>>>((ring) {
return List.from(ring).map<List<num>>((point) {
return List<num>.from(point, growable: false);
}).toList(growable: false);
}).toList(growable: false),
);
}