-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Support Hybrid Composition on Android #4017
Conversation
There was a problem hiding this 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.
...ps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart
Outdated
Show resolved
Hide resolved
if (defaultTargetPlatform == TargetPlatform.android) { | ||
if (defaultTargetPlatform == TargetPlatform.android && | ||
useAndroidViewSurface) { | ||
return PlatformViewLink( |
There was a problem hiding this comment.
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.
PlatformViewsService.initSurfaceAndroidView( | ||
id: params.id, | ||
viewType: 'plugins.flutter.io/google_maps', | ||
layoutDirection: TextDirection.rtl, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
.
...ps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart
Show resolved
Hide resolved
}, | ||
); | ||
|
||
// TODO(bparrishMines): Uncomment once https://github.com/flutter/plugins/pull/4017 has landed. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
...ps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart
Outdated
Show resolved
Hide resolved
...ps_flutter_platform_interface/lib/src/method_channel/method_channel_google_maps_flutter.dart
Outdated
Show resolved
Hide resolved
…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]>
Thanks Maurice. LGTM. I'm not sure why the interface deals with widgets. It's like an interface that is also the implementation? |
@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. |
@bparrishMines can it be checked it in? |
@blasten the |
uh, checks look bad. Maybe retrigger by pushing a new empty commit? |
@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 |
Resyncing will fix those failures, but I expect it to pick up various Android failures that started at the same time unfortunately. |
Fixes flutter/flutter#78578
Pre-launch Checklist
dart format
. See plugin_tool format)///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.