Location.fromJson constructor

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

Creates a Location from JSON data.

Implementation

factory Location.fromJson(Map<String, dynamic> json) {
  return Location(
    lat: json["lat"].toDouble(),
    lng: json["lng"].toDouble(),
  );
}