/// locTime : "2021-11-11 15:58:00"
|
/// latitude : 29.674523
|
/// longitude : 106.517533
|
/// radius : 40.0
|
/// country : "中国"
|
/// province : "重庆市"
|
/// city : "重庆市"
|
/// district : "渝北区"
|
/// town : "礼嘉街道"
|
/// street : "嘉康路"
|
/// address : "中国重庆市渝北区礼嘉街道嘉康路"
|
/// locationDetail : "在天际湾附近"
|
|
class BaiduLocation {
|
BaiduLocation({
|
String? locTime,
|
double? latitude,
|
double? longitude,
|
double? radius,
|
String? country,
|
String? province,
|
String? city,
|
String? district,
|
String? town,
|
String? street,
|
String? address,
|
String? locationDetail,
|
}) {
|
_locTime = locTime;
|
_latitude = latitude;
|
_longitude = longitude;
|
_radius = radius;
|
_country = country;
|
_province = province;
|
_city = city;
|
_district = district;
|
_town = town;
|
_street = street;
|
_address = address;
|
_locationDetail = locationDetail;
|
}
|
|
BaiduLocation.fromJson(dynamic json) {
|
_locTime = json['locTime'];
|
_latitude = json['latitude'];
|
_longitude = json['longitude'];
|
_radius = json['radius'];
|
_country = json['country'];
|
_province = json['province'];
|
_city = json['city'];
|
_district = json['district'];
|
_town = json['town'];
|
_street = json['street'];
|
_address = json['address'];
|
_locationDetail = json['locationDetail'];
|
}
|
|
String? _locTime;
|
double? _latitude;
|
double? _longitude;
|
double? _radius;
|
String? _country;
|
String? _province;
|
String? _city;
|
String? _district;
|
String? _town;
|
String? _street;
|
String? _address;
|
String? _locationDetail;
|
|
String? get locTime => _locTime;
|
|
double? get latitude => _latitude;
|
|
double? get longitude => _longitude;
|
|
double? get radius => _radius;
|
|
String? get country => _country;
|
|
String? get province => _province;
|
|
String? get city => _city;
|
|
String? get district => _district;
|
|
String? get town => _town;
|
|
String? get street => _street;
|
|
String? get address => _address;
|
|
String? get locationDetail => _locationDetail;
|
|
Map<String, dynamic> toJson() {
|
final map = <String, dynamic>{};
|
map['locTime'] = _locTime;
|
map['latitude'] = _latitude;
|
map['longitude'] = _longitude;
|
map['radius'] = _radius;
|
map['country'] = _country;
|
map['province'] = _province;
|
map['city'] = _city;
|
map['district'] = _district;
|
map['town'] = _town;
|
map['street'] = _street;
|
map['address'] = _address;
|
map['locationDetail'] = _locationDetail;
|
return map;
|
}
|
}
|
|
class SimpleLocation {
|
SimpleLocation({
|
double? latitude,
|
double? longitude,
|
String? address,
|
}) {
|
_latitude = latitude;
|
_longitude = longitude;
|
_address = address;
|
}
|
|
SimpleLocation.fromJson(dynamic json) {
|
_latitude = json['latitude'];
|
_longitude = json['longitude'];
|
_address = json['address'];
|
}
|
|
double? _latitude;
|
double? _longitude;
|
String? _address;
|
|
double? get latitude => _latitude;
|
|
double? get longitude => _longitude;
|
|
String? get address => _address;
|
|
Map<String, dynamic> toJson() {
|
final map = <String, dynamic>{};
|
map['latitude'] = _latitude;
|
map['longitude'] = _longitude;
|
map['address'] = _address;
|
return map;
|
}
|
}
|
|
class UserLocationInfo {
|
UserLocationInfo({
|
int? uid,
|
SimpleLocation? location,
|
String? updateTime,
|
}) {
|
_uid = uid;
|
_location = location;
|
_updateTime = updateTime;
|
}
|
|
UserLocationInfo.fromJson(dynamic json) {
|
_uid = json['uid'];
|
_location = SimpleLocation.fromJson(json['location']);
|
_updateTime = json['updateTime'];
|
}
|
|
int? _uid;
|
SimpleLocation? _location;
|
String? _updateTime;
|
|
int? get uid => _uid;
|
|
SimpleLocation? get location => _location;
|
|
String? get updateTime => _updateTime;
|
|
Map<String, dynamic> toJson() {
|
final map = <String, dynamic>{};
|
map['uid'] = _uid;
|
map['location'] = _location;
|
map['updateTime'] = _updateTime;
|
return map;
|
}
|
}
|