Feature.fromJson constructor
Feature.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Feature.fromJson(Map<String, dynamic> json) => Feature(
id: json["id"],
type: json["type"],
placeType: List<String>.from(json["place_type"].map((x) => x)),
properties: Properties.fromJson(json["properties"]),
text: json["text"],
placeName: json["place_name"],
center: List<double>.from(json["center"].map((x) => x?.toDouble())),
geometry: Geometry.fromJson(json["geometry"]),
context:
List<Context>.from(json["context"].map((x) => Context.fromJson(x))),
bbox: json["bbox"] == null
? []
: List<double>.from(json["bbox"]!.map((x) => x?.toDouble())),
matchingText: json["matching_text"],
matchingPlaceName: json["matching_place_name"],
);