Polygon.fromJson constructor

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

Creates a Polygon from JSON data.

Implementation

factory Polygon.fromJson(Map<String, dynamic> json) {
  final coordinates = json['coordinates'];

  return Polygon(_toLatLngListList(coordinates));
}