Thanks to visit codestin.com
Credit goes to github.com

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

Support Hybrid Composition on Android #4017

Merged
merged 16 commits into from
Jun 16, 2021

Conversation

bparrishMines
Copy link
Contributor

@bparrishMines bparrishMines commented Jun 5, 2021

Fixes flutter/flutter#78578

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides. (Note that unlike the flutter/flutter repo, the flutter/plugins repo does use dart format. See plugin_tool format)
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • 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 updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

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 % nits. Adding @blasten as he is more familiar with android hybrid composition.

if (defaultTargetPlatform == TargetPlatform.android) {
if (defaultTargetPlatform == TargetPlatform.android &&
useAndroidViewSurface) {
return PlatformViewLink(
Copy link
Contributor

Choose a reason for hiding this comment

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

this snippet of creating the platform view looks good to me, i'll still defer to @blasten to confirm.

@cyanglaz cyanglaz requested a review from blasten June 5, 2021 16:02
PlatformViewsService.initSurfaceAndroidView(
id: params.id,
viewType: 'plugins.flutter.io/google_maps',
layoutDirection: TextDirection.rtl,
Copy link

Choose a reason for hiding this comment

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

do you know why it needs RTL?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I misinterpreted https://github.com/flutter/plugins/blob/master/packages/webview_flutter/lib/webview_flutter.dart#L108.

This value is required for AndroidViewSurface, but not for AndroidView or UIKitView. I'll have to fix this when in google_maps_flutter.

},
);

// TODO(bparrishMines): Uncomment once https://github.com/flutter/plugins/pull/4017 has landed.
Copy link

Choose a reason for hiding this comment

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

Why is it required in this order?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The tests for the widget are in google_maps_flutter, but the changes to the code are in google_maps_flutter_platform_interface. However, google_maps_flutter pulls the latest version of the platform interface from pub.

bparrishMines and others added 5 commits June 8, 2021 15:26
…rface/lib/src/method_channel/method_channel_google_maps_flutter.dart

Co-authored-by: Emmanuel Garcia <[email protected]>
…rface/lib/src/method_channel/method_channel_google_maps_flutter.dart

Co-authored-by: Emmanuel Garcia <[email protected]>
@blasten
Copy link

blasten commented Jun 8, 2021

Thanks Maurice. LGTM.

I'm not sure why the interface deals with widgets. It's like an interface that is also the implementation?

@blasten
Copy link

blasten commented Jun 10, 2021

@bparrishMines it looks like the web plugin also needs to be updated. I will ask to see why these plugins are set up this way.

@blasten
Copy link

blasten commented Jun 14, 2021

@bparrishMines can it be checked it in?

@bparrishMines
Copy link
Contributor Author

@blasten the ci.yaml still hasn't ran. I'm also unfamiliar with this test. I'll pull in the latest changes and see if it passes.

@blasten
Copy link

blasten commented Jun 14, 2021

uh, checks look bad. Maybe retrigger by pushing a new empty commit?

@bparrishMines
Copy link
Contributor Author

@stuartmorgan Have you seen a failure like the above. It looks like its failing when setting the Flutter channel: https://github.com/flutter/plugins/blob/master/.cirrus.yml#L18

@stuartmorgan-g
Copy link
Contributor

Resyncing will fix those failures, but I expect it to pick up various Android failures that started at the same time unfortunately.

@bparrishMines bparrishMines added the waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land. label Jun 15, 2021
@fluttergithubbot fluttergithubbot merged commit da401ba into flutter:master Jun 16, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 16, 2021
@bparrishMines bparrishMines deleted the maps_hybrid branch June 16, 2021 21:22
fotiDim pushed a commit to fotiDim/plugins that referenced this pull request Sep 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes p: google_maps_flutter waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Transition Google Maps plugin to use Hybrid Composition on Android
5 participants