Location.fromJson constructor

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

Implementation

factory Location.fromJson(Map<String, dynamic> json) {
  return Location(
    country: json['country'] as String,
    countryCode: json['countryCode'] as String,
    region: json['region'] as String,
    regionName: json['regionName'] as String,
    timezone: json['timezone'] as String,
    latitude: json['lat'] as double,
    longitude: json['lon'] as double,
    isp: json['isp'] as String,
    currentIP: json['query'] as String,
  );
}