LocationInfo.fromJson constructor
LocationInfo.fromJson(
- Map<String, dynamic> json
)
Implementation
LocationInfo.fromJson(Map<String, dynamic> json) {
callbackTime = json['callbackTime'];
locationTime = json['locationTime']??json['locTime'];
locationType = (json['locationType'] as num?)?.toInt();
latitude = parseDouble(json['latitude']);
longitude = parseDouble(json['longitude']);
accuracy = (json['accuracy'] as num?)?.toDouble();
altitude = (json['altitude'] as num?)?.toDouble();
bearing = (json['bearing'] as num?)?.toDouble();
speed = (json['speed'] as num?)?.toDouble();
country = json['country'] as String?;
province = json['province'] as String?;
city = json['city'] as String?;
district = json['district'] as String?;
street = json['street'] as String?;
streetNumber = json['streetNumber'] as String?;
cityCode = json['cityCode'] as String?;
adCode = json['adCode'] as String?;
address = json['address'] as String?;
description = json['description'] as String?;
errorCode = (json['errorCode'] as num?)?.toInt();
errorInfo = json['errorInfo'] as String?;
}