Location.fromJson constructor

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

Constructs a Location object from a JSON map

Implementation

factory Location.fromJson(Map<String, dynamic> json) {
  return Location(
    longitude: json['longitude']!,
    latitude: json['latitude']!,
    horizontalAccuracy: json['horizontal_accuracy'],
    livePeriod: json['live_period'],
    heading: json['heading'],
    proximityAlertRadius: json['proximity_alert_radius'],
  );
}