You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
148 lines
3.2 KiB
148 lines
3.2 KiB
2 days ago
|
import 'package:json_annotation/json_annotation.dart';
|
||
|
|
||
|
part 'a_map_result.g.dart';
|
||
|
|
||
|
@JsonSerializable(explicitToJson: true)
|
||
|
class AMapResult {
|
||
|
final String? status;
|
||
|
final Regeocode? regeocode;
|
||
|
final String? info;
|
||
|
final String? infocode;
|
||
|
|
||
|
const AMapResult({
|
||
|
this.status,
|
||
|
this.regeocode,
|
||
|
this.info,
|
||
|
this.infocode,
|
||
|
});
|
||
|
|
||
|
factory AMapResult.fromJson(Map<String, dynamic> json) =>
|
||
|
_$AMapResultFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> toJson() => _$AMapResultToJson(this);
|
||
|
}
|
||
|
|
||
|
@JsonSerializable(explicitToJson: true)
|
||
|
class Regeocode {
|
||
|
final AddressComponent? addressComponent;
|
||
|
final String? formattedAddress;
|
||
|
|
||
|
const Regeocode({
|
||
|
this.addressComponent,
|
||
|
this.formattedAddress,
|
||
|
});
|
||
|
|
||
|
factory Regeocode.fromJson(Map<String, dynamic> json) =>
|
||
|
_$RegeocodeFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> toJson() => _$RegeocodeToJson(this);
|
||
|
}
|
||
|
|
||
|
@JsonSerializable(explicitToJson: true)
|
||
|
class AddressComponent {
|
||
|
final String? city;
|
||
|
final String? province;
|
||
|
final String? adcode;
|
||
|
final String? district;
|
||
|
final String? towncode;
|
||
|
final StreetNumber? streetNumber;
|
||
|
final String? country;
|
||
|
final String? township;
|
||
|
final List<BusinessAreas>? businessAreas;
|
||
|
final Building? building;
|
||
|
final Neighborhood? neighborhood;
|
||
|
final String? citycode;
|
||
|
|
||
|
const AddressComponent({
|
||
|
this.city,
|
||
|
this.province,
|
||
|
this.adcode,
|
||
|
this.district,
|
||
|
this.towncode,
|
||
|
this.streetNumber,
|
||
|
this.country,
|
||
|
this.township,
|
||
|
this.businessAreas,
|
||
|
this.building,
|
||
|
this.neighborhood,
|
||
|
this.citycode,
|
||
|
});
|
||
|
|
||
|
factory AddressComponent.fromJson(Map<String, dynamic> json) =>
|
||
|
_$AddressComponentFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> toJson() => _$AddressComponentToJson(this);
|
||
|
}
|
||
|
|
||
|
@JsonSerializable(explicitToJson: true)
|
||
|
class StreetNumber {
|
||
|
final String? number;
|
||
|
final String? location;
|
||
|
final String? direction;
|
||
|
final String? distance;
|
||
|
final String? street;
|
||
|
|
||
|
const StreetNumber({
|
||
|
this.number,
|
||
|
this.location,
|
||
|
this.direction,
|
||
|
this.distance,
|
||
|
this.street,
|
||
|
});
|
||
|
|
||
|
factory StreetNumber.fromJson(Map<String, dynamic> json) =>
|
||
|
_$StreetNumberFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> toJson() => _$StreetNumberToJson(this);
|
||
|
}
|
||
|
|
||
|
@JsonSerializable(explicitToJson: true)
|
||
|
class BusinessAreas {
|
||
|
final String? location;
|
||
|
final String? name;
|
||
|
final String? id;
|
||
|
|
||
|
const BusinessAreas({
|
||
|
this.location,
|
||
|
this.name,
|
||
|
this.id,
|
||
|
});
|
||
|
|
||
|
factory BusinessAreas.fromJson(Map<String, dynamic> json) =>
|
||
|
_$BusinessAreasFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> toJson() => _$BusinessAreasToJson(this);
|
||
|
}
|
||
|
|
||
|
@JsonSerializable(explicitToJson: true)
|
||
|
class Building {
|
||
|
final List<dynamic>? name;
|
||
|
final List<dynamic>? type;
|
||
|
|
||
|
const Building({
|
||
|
this.name,
|
||
|
this.type,
|
||
|
});
|
||
|
|
||
|
factory Building.fromJson(Map<String, dynamic> json) =>
|
||
|
_$BuildingFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> toJson() => _$BuildingToJson(this);
|
||
|
}
|
||
|
|
||
|
@JsonSerializable(explicitToJson: true)
|
||
|
class Neighborhood {
|
||
|
final List<dynamic>? name;
|
||
|
final List<dynamic>? type;
|
||
|
|
||
|
const Neighborhood({
|
||
|
this.name,
|
||
|
this.type,
|
||
|
});
|
||
|
|
||
|
factory Neighborhood.fromJson(Map<String, dynamic> json) =>
|
||
|
_$NeighborhoodFromJson(json);
|
||
|
|
||
|
Map<String, dynamic> toJson() => _$NeighborhoodToJson(this);
|
||
|
}
|