IpInfo.fromJson constructor

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

Implementation

IpInfo.fromJson(Map<String, dynamic> json) {
  if (json["status"] is String) this.status = json["status"];
  if (json["country"] is String) this.country = json["country"];
  if (json["countryCode"] is String) this.countryCode = json["countryCode"];
  if (json["region"] is String) this.region = json["region"];
  if (json["regionName"] is String) this.regionName = json["regionName"];
  if (json["city"] is String) this.city = json["city"];
  if (json["zip"] is String) this.zip = json["zip"];
  if (json["lat"] is double) this.lat = json["lat"];
  if (json["lon"] is double) this.lon = json["lon"];
  if (json["timezone"] is String) this.timezone = json["timezone"];
  if (json["isp"] is String) this.isp = json["isp"];
  if (json["org"] is String) this.org = json["org"];
  if (json["as"] is String) this.as = json["as"];
  if (json["query"] is String) this.query = json["query"];
}