diff --git a/lib/models/location_context.dart b/lib/models/location_context.dart index dede673..bb9a6b0 100644 --- a/lib/models/location_context.dart +++ b/lib/models/location_context.dart @@ -10,6 +10,7 @@ class Context { required this.postcode, this.district, required this.place, + this.locality, this.neighborhood, this.street, }); @@ -19,6 +20,7 @@ class Context { final Place? postcode; final Place? district; final Place? place; + final Place? locality; final Neighborhood? neighborhood; final Neighborhood? street; @@ -51,12 +53,7 @@ class Country { @JsonSerializable() class Region { - Region({ - this.id, - this.name, - this.regionCode, - this.regionCodeFull, - }); + Region({this.id, this.name, this.regionCode, this.regionCodeFull}); final String? id; final String? name; @@ -70,9 +67,7 @@ class Region { @JsonSerializable() class Neighborhood { - Neighborhood({ - required this.name, - }); + Neighborhood({required this.name}); final String name; @@ -84,10 +79,7 @@ class Neighborhood { @JsonSerializable() class Place { - Place({ - this.id, - required this.name, - }); + Place({this.id, required this.name}); final String? id; final String name; diff --git a/lib/models/location_context.g.dart b/lib/models/location_context.g.dart index 9c81e70..ec7f29f 100644 --- a/lib/models/location_context.g.dart +++ b/lib/models/location_context.g.dart @@ -22,6 +22,9 @@ Context _$ContextFromJson(Map json) => Context( place: json['place'] == null ? null : Place.fromJson(json['place'] as Map), + locality: json['locality'] == null + ? null + : Place.fromJson(json['locality'] as Map), neighborhood: json['neighborhood'] == null ? null : Neighborhood.fromJson(json['neighborhood'] as Map), @@ -36,6 +39,7 @@ Map _$ContextToJson(Context instance) => { 'postcode': instance.postcode, 'district': instance.district, 'place': instance.place, + 'locality': instance.locality, 'neighborhood': instance.neighborhood, 'street': instance.street, }; diff --git a/pubspec.yaml b/pubspec.yaml index 017f776..821e70d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mapbox_search description: A Flutter package for place search using MapBox Api and for Static map image -version: 4.4.0 +version: 4.4.1 homepage: https://github.com/ketanchoyal/mapbox_search