fromJson static method

Feature? fromJson(
  1. Map<String, dynamic>? json
)

Returns a new Feature instance and imports its values from json if it's non-null, null if json is null.

Implementation

static Feature? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return Feature(
    type: json[r'type'],
    geometry: FeatureGeometry.fromJson(json[r'geometry']),
    properties: json[r'properties'] == null
        ? null
        : List<String>.from(json[r'properties']),
  );
}