Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[google_maps_flutter] Introduce Platform Interface package. #2637

Merged
merged 50 commits into from
Apr 20, 2020

Conversation

ditman
Copy link
Member

@ditman ditman commented Apr 7, 2020

Description

This is the initial version of the Platform Interface package for the federation of the google_maps_flutter plugin.

The original work happened in this other PoC PR: #2577.

This PR prepares the package to be published in pub.dev.

Related Issues

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • No, this is not a breaking change.

cylyl and others added 30 commits April 6, 2020 17:34
* Make the method_channel implementation private, so it can't be
imported from other packages.
* Fix all the problems with Future<void> functions not returning a
future.
…ort from core plugin to maintain current API.
…port from the core plugin to preserve public API.
methods.

Update MethodChannel implementation and plugin to new API.
use the appropriate classes.

Move as much logic as possible to the MethodChannel.
Update the MethodChannel and core plugin implementation to the new API.
The interface can be a singleton, but implementations can still keep references to multiple different method
channels.
Wire them up in the method channel.
Add Event types so we can filter views of the stream later.
@ditman ditman changed the title Gmaps platform interface [google_maps_flutter] Introduce Platform Interface package. Apr 7, 2020
@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@ditman
Copy link
Member Author

ditman commented Apr 7, 2020

Please @cylyl, can you do this?

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

@cylyl
Copy link
Contributor

cylyl commented Apr 9, 2020

@googlebot I consent.
CLAs look good, thanks!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels Apr 9, 2020
@ditman
Copy link
Member Author

ditman commented Apr 9, 2020

Thanks @cylyl!!

Please @hterkelsen, @cyanglaz, can you take a look? This one seems ready to ship! (it's the same you've seen before, but without the changes to the core plugin)

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM based on my review in #2577

@ditman
Copy link
Member Author

ditman commented Apr 20, 2020

I'm going to merge this, and post another one with the required updates to the core plugin. Thanks for the review @cyanglaz!

@ditman ditman merged commit 514b7a1 into flutter:master Apr 20, 2020
@ditman ditman deleted the gmaps_platform_interface branch April 20, 2020 20:51
ditman added a commit to ditman/flutter-plugins that referenced this pull request Apr 20, 2020
…e. (flutter#2637) (#330)

This package contains the platform interface (and the MethodChannel default implementation) for the Google Maps Flutter plugin, up to version 0.5.26.

The most drastic change is including Streams of MapEvents for all different types of events that may come from the native side.

Core types of the plugin (LatLng, Marker, Circle...) now live in this package.

Co-authored-by: chung2012 <chungyl2012@gmail.com>
EdwinRomelta pushed a commit to EdwinRomelta/plugins that referenced this pull request Jun 11, 2020
…e. (flutter#2637)

This package contains the platform interface (and the MethodChannel default implementation) for the Google Maps Flutter plugin, up to version 0.5.26.

The most drastic change is including Streams of MapEvents for all different types of events that may come from the native side.

Core types of the plugin (LatLng, Marker, Circle...) now live in this package.

Co-authored-by: chung2012 <chungyl2012@gmail.com>
@tolotrasamuel
Copy link

@ditman can you please assist on this flutter/flutter#65788 ?

I made a PR on google_maps_flutter. However, google_maps_flutter depends on google_maps_flutter_platform_interface and my PR needed to modify both plugins.

So I changed pubspec.yaml as follow in google_maps_flutter

dependencies:
  flutter:
    sdk: flutter
  flutter_plugin_android_lifecycle: ^1.0.0
  google_maps_flutter_platform_interface: # I changed this from ^1.0.4
    path: ../google_maps_flutter_platform_interface

Then I did the Pull Request but on of the checks says:

* Don't depend on "google_maps_flutter_platform_interface" from the path source. Use the hosted source instead. For example:

I don't understand. How am I supposed to use the hosted plugin although I am modifying it

This is my PR https://github.com/flutter/plugins/pull/3027/checks?check_run_id=1117524341

jorgefspereira pushed a commit to jorgefspereira/plugins_flutter that referenced this pull request Oct 10, 2020
…e. (flutter#2637)

This package contains the platform interface (and the MethodChannel default implementation) for the Google Maps Flutter plugin, up to version 0.5.26.

The most drastic change is including Streams of MapEvents for all different types of events that may come from the native side.

Core types of the plugin (LatLng, Marker, Circle...) now live in this package.

Co-authored-by: chung2012 <chungyl2012@gmail.com>
FlutterSu pushed a commit to FlutterSu/flutter-plugins that referenced this pull request Nov 20, 2020
…e. (flutter#2637)

This package contains the platform interface (and the MethodChannel default implementation) for the Google Maps Flutter plugin, up to version 0.5.26.

The most drastic change is including Streams of MapEvents for all different types of events that may come from the native side.

Core types of the plugin (LatLng, Marker, Circle...) now live in this package.

Co-authored-by: chung2012 <chungyl2012@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants