Skip to content

Commit

Permalink
refactor: fine tuning
Browse files Browse the repository at this point in the history
  • Loading branch information
OutdatedGuy committed Oct 8, 2024
1 parent 79eb7cb commit 5b94e80
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion geocoding_darwin/darwin/Classes/GeocodingPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
12 changes: 6 additions & 6 deletions geocoding_darwin/example/lib/plugin_example/geocode_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class _GeocodeWidgetState extends State<GeocodeWidget> {
final TextEditingController _latitudeController = TextEditingController();
final TextEditingController _longitudeController = TextEditingController();
String _output = '';
GeocodingDarwin _geocodingIOS = GeocodingDarwin();
GeocodingDarwin _geocodingDarwin = GeocodingDarwin();

@override
void initState() {
Expand Down Expand Up @@ -75,7 +75,7 @@ class _GeocodeWidgetState extends State<GeocodeWidget> {
final latitude = double.parse(_latitudeController.text);
final longitude = double.parse(_longitudeController.text);

_geocodingIOS
_geocodingDarwin
.placemarkFromCoordinates(latitude, longitude)
.then((placemarks) {
var output = 'No results found.';
Expand Down Expand Up @@ -108,7 +108,7 @@ class _GeocodeWidgetState extends State<GeocodeWidget> {
child: ElevatedButton(
child: Text('Look up location'),
onPressed: () {
_geocodingIOS
_geocodingDarwin
.locationFromAddress(_addressController.text)
.then((locations) {
var output = 'No results found.';
Expand All @@ -129,7 +129,7 @@ class _GeocodeWidgetState extends State<GeocodeWidget> {
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";
Expand All @@ -145,7 +145,7 @@ class _GeocodeWidgetState extends State<GeocodeWidget> {
child: ElevatedButton(
child: Text('Set locale en_US'),
onPressed: () {
_geocodingIOS.setLocaleIdentifier("en_US").then((_) {
_geocodingDarwin.setLocaleIdentifier("en_US").then((_) {
setState(() {});
});
})),
Expand All @@ -156,7 +156,7 @@ class _GeocodeWidgetState extends State<GeocodeWidget> {
child: ElevatedButton(
child: Text('Set locale nl_NL'),
onPressed: () {
_geocodingIOS.setLocaleIdentifier("nl_NL").then((_) {
_geocodingDarwin.setLocaleIdentifier("nl_NL").then((_) {
setState(() {});
});
})),
Expand Down

0 comments on commit 5b94e80

Please sign in to comment.