From 5b94e80606b0ca2cb370599b4842096b6ec6c3d1 Mon Sep 17 00:00:00 2001 From: OutdatedGuy Date: Fri, 23 Aug 2024 05:38:44 +0530 Subject: [PATCH] refactor: fine tuning --- geocoding_darwin/darwin/Classes/GeocodingPlugin.m | 2 +- .../example/lib/plugin_example/geocode_page.dart | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/geocoding_darwin/darwin/Classes/GeocodingPlugin.m b/geocoding_darwin/darwin/Classes/GeocodingPlugin.m index 7fb57b3..136a764 100644 --- a/geocoding_darwin/darwin/Classes/GeocodingPlugin.m +++ b/geocoding_darwin/darwin/Classes/GeocodingPlugin.m @@ -5,7 +5,7 @@ // Created by Maurits van Beusekom on 07/06/2020. // -#import "Extensions/CLPlacemarkExtensions.h" +#import "CLPlacemarkExtensions.h" #import "GeocodingHandler.h" #import "GeocodingPlugin.h" diff --git a/geocoding_darwin/example/lib/plugin_example/geocode_page.dart b/geocoding_darwin/example/lib/plugin_example/geocode_page.dart index 56bf95d..42dceb5 100644 --- a/geocoding_darwin/example/lib/plugin_example/geocode_page.dart +++ b/geocoding_darwin/example/lib/plugin_example/geocode_page.dart @@ -14,7 +14,7 @@ class _GeocodeWidgetState extends State { final TextEditingController _latitudeController = TextEditingController(); final TextEditingController _longitudeController = TextEditingController(); String _output = ''; - GeocodingDarwin _geocodingIOS = GeocodingDarwin(); + GeocodingDarwin _geocodingDarwin = GeocodingDarwin(); @override void initState() { @@ -75,7 +75,7 @@ class _GeocodeWidgetState extends State { final latitude = double.parse(_latitudeController.text); final longitude = double.parse(_longitudeController.text); - _geocodingIOS + _geocodingDarwin .placemarkFromCoordinates(latitude, longitude) .then((placemarks) { var output = 'No results found.'; @@ -108,7 +108,7 @@ class _GeocodeWidgetState extends State { child: ElevatedButton( child: Text('Look up location'), onPressed: () { - _geocodingIOS + _geocodingDarwin .locationFromAddress(_addressController.text) .then((locations) { var output = 'No results found.'; @@ -129,7 +129,7 @@ class _GeocodeWidgetState extends State { child: ElevatedButton( child: Text('Is present'), onPressed: () { - _geocodingIOS.isPresent().then((isPresent) { + _geocodingDarwin.isPresent().then((isPresent) { var output = isPresent ? "Geocoder is present" : "Geocoder is not present"; @@ -145,7 +145,7 @@ class _GeocodeWidgetState extends State { child: ElevatedButton( child: Text('Set locale en_US'), onPressed: () { - _geocodingIOS.setLocaleIdentifier("en_US").then((_) { + _geocodingDarwin.setLocaleIdentifier("en_US").then((_) { setState(() {}); }); })), @@ -156,7 +156,7 @@ class _GeocodeWidgetState extends State { child: ElevatedButton( child: Text('Set locale nl_NL'), onPressed: () { - _geocodingIOS.setLocaleIdentifier("nl_NL").then((_) { + _geocodingDarwin.setLocaleIdentifier("nl_NL").then((_) { setState(() {}); }); })),