From 8c55aa07c4d37805eb6233c677dbe864982b50ed Mon Sep 17 00:00:00 2001 From: Ketan Choyal Date: Thu, 18 Jan 2024 11:01:04 -0500 Subject: [PATCH] fixed #82 --- CHANGELOG.md | 4 ++++ lib/models/suggestion_response.dart | 4 ++-- pubspec.yaml | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a3535b..0e01f2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# [4.2.1] - 18 Jan 2024 +- Fixed `externalIds` in `SuggestionResponse` class. Mapbox has changed the response for `externalIds` and it can be nullable now. + + # [4.2.0] - 26 Nov 2023 - Huge code refactoring by [@LorenzSchueler](https://github.com/LorenzSchueler). Json parsing is now done using [json_serializable](https://pub.dev/packages/json_serializable) and [json_annotation](https://pub.dev/packages/json_annotation) packages. diff --git a/lib/models/suggestion_response.dart b/lib/models/suggestion_response.dart index 2e54f3f..780694c 100644 --- a/lib/models/suggestion_response.dart +++ b/lib/models/suggestion_response.dart @@ -34,7 +34,7 @@ class Suggestion { required this.context, required this.language, required this.maki, - required this.externalIds, + this.externalIds, this.poiCategory, this.poiCategoryIds, this.brand, @@ -51,7 +51,7 @@ class Suggestion { final Context? context; final String language; final String? maki; - final ExternalIds externalIds; + final ExternalIds? externalIds; final List? poiCategory; final List? poiCategoryIds; final List? brand; diff --git a/pubspec.yaml b/pubspec.yaml index c69b4ed..824cbd7 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.2.0 +version: 4.2.1 homepage: https://github.com/ketanchoyal/mapbox_search