-
Notifications
You must be signed in to change notification settings - Fork 6k
Reland: Create PlatformView instance right after method channel call from Dart #20568
Conversation
…el call from Dart (flutter#20500)" (flutter#20564)" This reverts commit 7b9ac27.
1f15b7e
to
ed148a8
Compare
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, just a few notes. Thanks for the added test.
View mutatorView = mutatorViews.get(viewId); | ||
for (int i = 0; i < platformViewParent.size(); i++) { | ||
final int viewId = platformViewParent.keyAt(i); | ||
final View parentView = platformViewParent.get(viewId); |
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.
Is it possible parentView will be null?
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.
It's not possible. This is iterating over the existing entries, and the code never puts null
in the dictionary.
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
@@ -79,9 +79,20 @@ | |||
// it is associated with(e.g if a platform view creates other views in the same virtual display. | |||
private final HashMap<Context, View> contextToPlatformView; | |||
|
|||
private final SparseArray<PlatformViewsChannel.PlatformViewCreationRequest> platformViewRequests; | |||
// The view returned by `PlatformView#getView()`. |
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.
nits: views
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.
Done
This pull request is not suitable for automatic merging in its current state.
|
…el call from Dart (flutter/engine#20568)
Relands #20500
1f15b7e fixes the issue.