IpLocation.fromJson constructor
Creates class instance from JSON Object that can be returned by Android or iOS agent, or can be a serialization result
Implementation
IpLocation.fromJson(Map<String, dynamic> json)
: accuracyRadius = json['accuracyRadius'],
latitude = json['latitude'],
longitude = json['longitude'],
postalCode = json['postalCode'],
timezone = json['timezone'],
city = json['city'] != null
? City.fromJson(Map<String, dynamic>.from(json['city']))
: null,
country = json['country'] != null
? Country.fromJson(Map<String, dynamic>.from(json['country']))
: null,
continent = json['continent'] != null
? Continent.fromJson(Map<String, dynamic>.from(json['continent']))
: null,
subdivisions = json['subdivisions'] != null
? List<Subdivision>.from((json['subdivisions'] as List).map(
(subdivision) => Subdivision.fromJson(
Map<String, dynamic>.from(subdivision))))
: null;