From 81d91992642ad0fc617bef02855c3a29bd8df4c6 Mon Sep 17 00:00:00 2001 From: TimHoogstrate Date: Wed, 13 Mar 2024 08:25:18 +0100 Subject: [PATCH] updates documentation isPresent() (#222) * updates documentation isPresent() * fixed typo * Update geocoding/CHANGELOG.md Co-authored-by: Maurits van Beusekom --------- Co-authored-by: Maurits van Beusekom --- geocoding/CHANGELOG.md | 5 +++++ geocoding/lib/geocoding.dart | 18 +++++------------- geocoding/pubspec.yaml | 2 +- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/geocoding/CHANGELOG.md b/geocoding/CHANGELOG.md index 4f708c7..3a5f76c 100644 --- a/geocoding/CHANGELOG.md +++ b/geocoding/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.2.2 + +- Updates documentation for isPresent(). +- Removes unused `LocaleIdentifier` parameter for isPresent(). + ## 2.2.1+1 - Reverts changes from version `2.2.1`, `2.2.1` should not be used. Use either version `2.2.1+1` or `3.0.0`. diff --git a/geocoding/lib/geocoding.dart b/geocoding/lib/geocoding.dart index df8ff63..912dc35 100644 --- a/geocoding/lib/geocoding.dart +++ b/geocoding/lib/geocoding.dart @@ -45,18 +45,10 @@ Future> placemarkFromCoordinates( longitude, ); -/// Returns a list of [Location] instances found for the supplied address. +/// Returns true if there is a geocoder implementation present that may return results. +/// If true, there is still no guarantee that any individual geocoding attempt will succeed. /// -/// In most situations the returned list should only contain one entry. -/// However in some situations where the supplied address could not be -/// resolved into a single [Location], multiple [Location] instances may be -/// returned. /// -/// Optionally you can specify a locale in which the results are returned. -/// When not supplied the currently active locale of the device will be used. -/// The `localeIdentifier` should be formatted using the syntax: -/// [languageCode]_[countryCode] (eg. en_US or nl_NL). -Future isPresent({ - String? localeIdentifier, -}) => - GeocodingPlatform.instance!.isPresent(); +/// This method is only implemented on Android, calling this on iOS always +/// returns [true]. +Future isPresent() => GeocodingPlatform.instance!.isPresent(); diff --git a/geocoding/pubspec.yaml b/geocoding/pubspec.yaml index 522670a..2c488dc 100644 --- a/geocoding/pubspec.yaml +++ b/geocoding/pubspec.yaml @@ -1,6 +1,6 @@ name: geocoding description: A Flutter Geocoding plugin which provides easy geocoding and reverse-geocoding features. -version: 2.2.1+1 +version: 2.2.2 repository: https://github.com/baseflow/flutter-geocoding/tree/main/geocoding issue_tracker: https://github.com/Baseflow/flutter-geocoding/issues