Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: renamed package geocoding_ios to geocoding_darwin #245

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,19 @@ updates:
open-pull-requests-limit: 10

- package-ecosystem: "pub"
directory: "/geocoding_ios"
directory: "/geocoding_darwin"
commit-message:
prefix: "[geocoding_ios]"
prefix: "[geocoding_darwin]"
schedule:
interval: "weekly"
reviewers:
- "mvanbeusekom"
open-pull-requests-limit: 10

- package-ecosystem: "pub"
directory: "/geocoding_ios/example"
directory: "/geocoding_darwin/example"
commit-message:
prefix: "[geocoding_ios]"
prefix: "[geocoding_darwin]"
schedule:
interval: "weekly"
reviewers:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# This is a basic workflow to help you get started with Actions

name: geocoding_ios
name: geocoding_darwin

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
branches: [ main ]
paths:
- 'geocoding_ios/**'
- '.github/workflows/geocoding_ios.yaml'
- 'geocoding_darwin/**'
- '.github/workflows/geocoding_darwin.yaml'

pull_request:
branches: [ main ]
paths:
- 'geocoding_ios/**'
- '.github/workflows/geocoding_ios.yaml'
- 'geocoding_darwin/**'
- '.github/workflows/geocoding_darwin.yaml'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand All @@ -26,8 +26,8 @@ jobs:
runs-on: macos-latest

env:
source-directory: ./geocoding_ios
example-directory: ./geocoding_ios/example
source-directory: ./geocoding_darwin
example-directory: ./geocoding_darwin/example

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions geocoding_darwin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 3.1.0

- Renames the package previously published as [`geocoding_ios`](https://pub.dev/packages/geocoding_ios)
File renamed without changes.
7 changes: 4 additions & 3 deletions geocoding_ios/README.md → geocoding_darwin/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# geocoding\_ios
# geocoding_darwin

The iOS implementation of [`geocoding`][1].

## Usage

This package is [endorsed][2], which means you can simply use `geocoding`
normally. This package will be automatically included in your app when you do.
normally. This package will be automatically included in your app when you do,
so you do not need to add it to your `pubspec.yaml`.

[1]: https://pub.dev/packages/geocoding
[2]: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#endorsed-federated-plugin
[2]: https://flutter.dev/to/endorsed-federated-plugin
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Run `pod lib lint geocoding.podspec' to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'geocoding_ios'
s.name = 'geocoding_darwin'
s.version = '1.0.5'
s.summary = 'A Flutter Geocoding plugin which provides easy geocoding and reverse-geocoding features.'
s.description = <<-DESC
Expand All @@ -20,5 +20,5 @@ A new flutter plugin project.

# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
s.resource_bundles = {'geocoding_ios_privacy' => ['Resources/PrivacyInfo.xcprivacy']}
s.resource_bundles = {'geocoding_darwin_privacy' => ['Resources/PrivacyInfo.xcprivacy']}
end
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class BaseflowPluginExample extends StatelessWidget {
createMaterialColor(const Color.fromRGBO(48, 49, 60, 1));

/// Constructs the [BaseflowPluginExample] class
BaseflowPluginExample({Key? key}) : super(key: key);
BaseflowPluginExample({super.key});

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -89,7 +89,7 @@ class BaseflowPluginExample extends StatelessWidget {
/// A Flutter example demonstrating how the [pluginName] plugin could be used
class AppHome extends StatefulWidget {
/// Constructs the [AppHome] class
const AppHome({Key? key, required this.title}) : super(key: key);
const AppHome({super.key, required this.title});

/// The [title] of the application, which is shown in the application's
/// title bar.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import 'package:flutter/material.dart';
import 'package:geocoding_ios/geocoding_ios.dart';
import 'package:geocoding_darwin/geocoding_darwin.dart';

import '../template/globals.dart';

/// Example [Widget] showing the use of the Geocode plugin
class GeocodeWidget extends StatefulWidget {
/// Constructs the [GeocodeWidget] class
const GeocodeWidget({Key? key}) : super(key: key);
const GeocodeWidget({super.key});

@override
State<GeocodeWidget> createState() => _GeocodeWidgetState();
Expand All @@ -17,7 +17,7 @@ class _GeocodeWidgetState extends State<GeocodeWidget> {
final TextEditingController _latitudeController = TextEditingController();
final TextEditingController _longitudeController = TextEditingController();
String _output = '';
final GeocodingIOS _geocodingIOS = GeocodingIOS();
final GeocodingDarwin _geocodingDarwin = GeocodingDarwin();

@override
void initState() {
Expand Down Expand Up @@ -78,7 +78,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 @@ -111,7 +111,7 @@ class _GeocodeWidgetState extends State<GeocodeWidget> {
child: ElevatedButton(
child: const Text('Look up location'),
onPressed: () {
_geocodingIOS
_geocodingDarwin
.locationFromAddress(_addressController.text)
.then((locations) {
var output = 'No results found.';
Expand All @@ -132,7 +132,7 @@ class _GeocodeWidgetState extends State<GeocodeWidget> {
child: ElevatedButton(
child: const Text('Is present'),
onPressed: () {
_geocodingIOS.isPresent().then((isPresent) {
_geocodingDarwin.isPresent().then((isPresent) {
var output = isPresent
? "Geocoder is present"
: "Geocoder is not present";
Expand All @@ -148,7 +148,7 @@ class _GeocodeWidgetState extends State<GeocodeWidget> {
child: ElevatedButton(
child: const Text('Set locale en_US'),
onPressed: () {
_geocodingIOS.setLocaleIdentifier("en_US").then((_) {
_geocodingDarwin.setLocaleIdentifier("en_US").then((_) {
setState(() {});
});
})),
Expand All @@ -159,7 +159,7 @@ class _GeocodeWidgetState extends State<GeocodeWidget> {
child: ElevatedButton(
child: const Text('Set locale nl_NL'),
onPressed: () {
_geocodingIOS.setLocaleIdentifier("nl_NL").then((_) {
_geocodingDarwin.setLocaleIdentifier("nl_NL").then((_) {
setState(() {});
});
})),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'globals.dart';
/// [StatelessWidget] displaying information about Baseflow
class InfoPage extends StatelessWidget {
/// Constructs the [InfoPage] class
const InfoPage({Key? key}) : super(key: key);
const InfoPage({super.key});

@override
Widget build(BuildContext context) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: geocoding_ios_example
name: geocoding_darwin_example
description: Demonstrates how to use the geocoding plugin.

# The following line prevents the package from being accidentally published to
Expand All @@ -13,9 +13,9 @@ dependencies:
flutter:
sdk: flutter

geocoding_ios:
geocoding_darwin:
# When depending on this package from a real application you should use:
# geocoding_ios: ^x.y.z
# geocoding_darwin: ^x.y.z
# See https://dart.dev/tools/pub/dependencies#version-constraints
# The example app is bundled with the plugin so we use a path dependency on
# the parent directory to use the current plugin's version.
Expand Down
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import 'package:geocoding_platform_interface/geocoding_platform_interface.dart';
const MethodChannel _channel = MethodChannel('flutter.baseflow.com/geocoding');

/// An implementation of [GeocodingPlatform] for iOS.
class GeocodingIOS extends GeocodingPlatform {
class GeocodingDarwin extends GeocodingPlatform {
/// Registers this class as the default instance of [GeocodingPlatform].
static void registerWith() {
GeocodingPlatform.instance = GeocodingIOS();
GeocodingPlatform.instance = GeocodingDarwin();
}

String? _localeIdentifier;
Expand Down
9 changes: 5 additions & 4 deletions geocoding_ios/pubspec.yaml → geocoding_darwin/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: geocoding_ios
name: geocoding_darwin
description: A Flutter Geocoding plugin which provides easy geocoding and reverse-geocoding features.
version: 3.0.1
repository: https://github.com/baseflow/flutter-geocoding/tree/main/geocoding_ios
version: 3.1.0
repository: https://github.com/baseflow/flutter-geocoding/tree/main/geocoding_darwin
issue_tracker: https://github.com/Baseflow/flutter-geocoding/issues

environment:
Expand Down Expand Up @@ -36,4 +36,5 @@ flutter:
platforms:
ios:
pluginClass: GeocodingPlugin
dartPluginClass: GeocodingIOS
dartPluginClass: GeocodingDarwin
sharedDarwinSource: true
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:geocoding_ios/geocoding_ios.dart';
import 'package:geocoding_darwin/geocoding_darwin.dart';
import 'package:geocoding_platform_interface/geocoding_platform_interface.dart';

final mockLocation = Location(
Expand Down Expand Up @@ -40,8 +40,8 @@ void main() {
});

test('registers instance', () {
GeocodingIOS.registerWith();
expect(GeocodingPlatform.instance, isA<GeocodingIOS>());
GeocodingDarwin.registerWith();
expect(GeocodingPlatform.instance, isA<GeocodingDarwin>());
});

group('GeocodingAndroid', () {
Expand All @@ -55,7 +55,7 @@ void main() {
]);
});

final geocoding = GeocodingIOS();
final geocoding = GeocodingDarwin();
final locations = await (geocoding.locationFromAddress(''));

expect(
Expand All @@ -80,7 +80,7 @@ void main() {
]);
});

final geocoding = GeocodingIOS();
final geocoding = GeocodingDarwin();
final locations = await (geocoding.placemarkFromCoordinates(0, 0));

expect(
Expand Down
28 changes: 0 additions & 28 deletions geocoding_ios/CHANGELOG.md

This file was deleted.