Bounds.fromJson constructor

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

Converts a map in JSON format to its corresponding object.

Implementation

factory Bounds.fromJson(Map<String, dynamic> json) => Bounds(
      northeast: LatLng.fromJson(
            [json['northeast']['lat'], json['northeast']['lng']],
          ) ??
          const LatLng(0, 0),
      southwest: LatLng.fromJson(
            [json['southwest']['lat'], json['southwest']['lng']],
          ) ??
          const LatLng(0, 0),
    );