Skip to content

Commit

Permalink
Fixed #88 and #86
Browse files Browse the repository at this point in the history
  • Loading branch information
Ketan Choyal authored and ketanchoyal committed Jan 31, 2024
1 parent 8c55aa0 commit 5cd7c3f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# [4.2.2] - 31 Jan 2024
- Fixed `externalIds` in `SuggestionResponse` and `RetrieveResonse` class and generated *.g.dart files again to include these changes.
- Fixed bug where `proximity` would always resolve to `NoProximity()` even when supplied with a value.

# [4.2.1] - 18 Jan 2024
- Fixed `externalIds` in `SuggestionResponse` class. Mapbox has changed the response for `externalIds` and it can be nullable now.

Expand Down
4 changes: 2 additions & 2 deletions lib/models/retrieve_response.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class RetrieveProperties {
required this.bbox,
required this.language,
required this.maki,
required this.externalIds,
this.externalIds,
required this.metadata,
});

Expand All @@ -82,7 +82,7 @@ class RetrieveProperties {
final BBox bbox;
final String language;
final String maki;
final ExternalIds externalIds;
final ExternalIds? externalIds;
final ExternalIds metadata;

factory RetrieveProperties.fromJson(Map<String, dynamic> json) =>
Expand Down
5 changes: 3 additions & 2 deletions lib/models/retrieve_response.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions lib/models/suggestion_response.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/src/geocoding_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class GeoCoding {
Location? location,
Proximity proximity = const NoProximity(),
}) async {
if (proximity is! Location) {
if (proximity is! LocationProximity) {
proximity =
location != null ? Proximity.Location(location) : const NoProximity();
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: mapbox_search
description: A Flutter package for place search using MapBox Api and for Static map image
version: 4.2.1
version: 4.2.2

homepage: https://github.com/ketanchoyal/mapbox_search

Expand Down

0 comments on commit 5cd7c3f

Please sign in to comment.