-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[webview_flutter] Move the method channel behind the platform interface #1645
Conversation
|
@nkoroste please take a look |
cyanglaz
left a comment
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.
Overall approach looks good, left some comments.
| } | ||
|
|
||
| @override | ||
| Future<void> goBack() async { |
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.
optional nit:
`Future goBack() =>_channel.invokeMethod("goBack");
Same for others.
Also, we prod don't need the async mark in the method signature if we keep this style.
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
| Future<void> loadUrl( | ||
| String url, { | ||
| Map<String, String> headers, | ||
| }) async { |
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 we need the async here?
amirh
left a comment
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.
Thanks, PTAL
| } | ||
|
|
||
| @override | ||
| Future<void> goBack() async { |
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
cyanglaz
left a comment
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!
This is a followup for #1618, #1624, and #1645, and moves the plugins.flutter.io/cookie_manager method channel behind the platform interface which allows a third party package to provide a new platform implementation the cooke manager. See the description for #1618 for more details. Following this PR all platform specific code can be replaced by an external package.
This is a followup for #1618 and #1624, and moves all of the
plugins.flutter.io/webviewmethod channel calls behind the platform interface, which allows a third party package to provide a new platform implementation for all of these methods.See the description for #1618 for more details.
The last remaining part is the
plugins.flutter.io/cookie_managerchannel which I'm leaving for a followup PR.