LocationInfo.fromJson constructor
Creates a LocationInfo from a JSON object.
Implementation
factory LocationInfo.fromJson(Map<String, dynamic> json) => LocationInfo(
country: json['country'] ?? '',
countryCode: json['country_code'] ?? '',
city: json['city'] ?? '',
state: json['state'] ?? '',
zipcode: json['zipcode'] ?? '',
latitude: (json['latitude'] ?? 0).toDouble(),
longitude: (json['longitude'] ?? 0).toDouble(),
timezone: json['timezone'] ?? '',
localtime: json['localtime'] ?? '',
);