From 358d95a9de9c69db93b95087a37e892fcdbd6b4e Mon Sep 17 00:00:00 2001 From: Jeroen Weener Date: Tue, 21 Nov 2023 13:25:21 +0100 Subject: [PATCH 1/3] Add support for `placemarkFromAddress` in platform interface --- geocoding_platform_interface/CHANGELOG.md | 4 ++++ .../lib/src/geocoding_platform_interface.dart | 13 +++++++++++++ geocoding_platform_interface/pubspec.yaml | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/geocoding_platform_interface/CHANGELOG.md b/geocoding_platform_interface/CHANGELOG.md index de4cf3f..c1942b1 100644 --- a/geocoding_platform_interface/CHANGELOG.md +++ b/geocoding_platform_interface/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.1.0 + +- Adds `placemarkFromAddress` method to the platform interface. + ## 3.0.0 - **Breaking Change** Changes to the platform interface calls, the locale is now set in a separate call. diff --git a/geocoding_platform_interface/lib/src/geocoding_platform_interface.dart b/geocoding_platform_interface/lib/src/geocoding_platform_interface.dart index 848eb17..415c05e 100644 --- a/geocoding_platform_interface/lib/src/geocoding_platform_interface.dart +++ b/geocoding_platform_interface/lib/src/geocoding_platform_interface.dart @@ -72,4 +72,17 @@ abstract class GeocodingPlatform extends PlatformInterface { throw UnimplementedError( 'placemarkFromCoordinates() has not been implementated.'); } + + /// Returns a list of [Placemark] instances found for the supplied address. + /// + /// 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 [Placemark], multiple [Placemark] instances may be + /// returned. + Future> placemarkFromAddress( + String address, + ) { + throw UnimplementedError( + 'placemarkFromAddress() has not been implementated.'); + } } diff --git a/geocoding_platform_interface/pubspec.yaml b/geocoding_platform_interface/pubspec.yaml index 198acac..e696f56 100644 --- a/geocoding_platform_interface/pubspec.yaml +++ b/geocoding_platform_interface/pubspec.yaml @@ -3,7 +3,7 @@ description: A common platform interface for the geocoding plugin. homepage: https://github.com/baseflow/flutter-geocoding/tree/main/geocoding_platform_interface # NOTE: We strongly prefer non-breaking changes, even at the expense of a # less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes -version: 3.0.0 +version: 3.1.0 dependencies: flutter: From 32a096a8a630de4025d765c3687245cbc5eb4d02 Mon Sep 17 00:00:00 2001 From: Jeroen Weener Date: Tue, 21 Nov 2023 14:16:59 +0100 Subject: [PATCH 2/3] Update Dart SDK constraints --- geocoding_platform_interface/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geocoding_platform_interface/pubspec.yaml b/geocoding_platform_interface/pubspec.yaml index e696f56..e2da3c5 100644 --- a/geocoding_platform_interface/pubspec.yaml +++ b/geocoding_platform_interface/pubspec.yaml @@ -20,5 +20,5 @@ dev_dependencies: mockito: ^5.0.0 environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.12.0 <4.0.0' flutter: ">=1.10.0" From 958f8f2c71ba584813c3f3887192df368be605ea Mon Sep 17 00:00:00 2001 From: Jeroen Weener Date: Tue, 21 Nov 2023 14:16:59 +0100 Subject: [PATCH 3/3] Update Dart SDK constraints --- geocoding_platform_interface/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geocoding_platform_interface/pubspec.yaml b/geocoding_platform_interface/pubspec.yaml index e696f56..e2da3c5 100644 --- a/geocoding_platform_interface/pubspec.yaml +++ b/geocoding_platform_interface/pubspec.yaml @@ -20,5 +20,5 @@ dev_dependencies: mockito: ^5.0.0 environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.12.0 <4.0.0' flutter: ">=1.10.0"