50 lines
1.1 KiB
Dart
50 lines
1.1 KiB
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'address.freezed.dart';
|
|
|
|
part 'address.g.dart';
|
|
|
|
@freezed
|
|
abstract class Address with _$Address {
|
|
const factory Address({
|
|
String? road,
|
|
String? neighbourhood,
|
|
String? suburb,
|
|
String? state,
|
|
String? borough,
|
|
String? city,
|
|
String? district,
|
|
String? county,
|
|
String? province,
|
|
String? ISO3166_2_lvl4,
|
|
String? postcode,
|
|
String? country,
|
|
String? country_code,
|
|
}) = _Address;
|
|
|
|
factory Address.fromJson(Map<String, dynamic> json) => _$AddressFromJson(json);
|
|
}
|
|
|
|
@freezed
|
|
abstract class LocationDetails with _$LocationDetails {
|
|
const factory LocationDetails({
|
|
int? place_id,
|
|
String? licence,
|
|
String? osm_type,
|
|
int? osm_id,
|
|
String? lat,
|
|
String? lon,
|
|
String? class_,
|
|
String? type,
|
|
int? place_rank,
|
|
double? importance,
|
|
String? addresstype,
|
|
String? name,
|
|
String? display_name,
|
|
Address? address,
|
|
List<String>? boundingbox,
|
|
}) = _LocationDetails;
|
|
|
|
factory LocationDetails.fromJson(Map<String, dynamic> json) => _$LocationDetailsFromJson(json);
|
|
}
|