-
Notifications
You must be signed in to change notification settings - Fork 9.7k
WebView JavasScript channels Android implementation. #1130
Conversation
mklim
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
Same as the other PR, not sure if it's totally worth it for this but this is the type of thing that you could add unit tests for.
|
|
||
| applySettings((Map<String, Object>) params.get("settings")); | ||
|
|
||
| if (params.containsKey("javascriptChannelNames")) { |
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.
nit, optional: Consider breaking out the "javascriptChannelNames" magic string into a private constant on this class or a named variable. It'll prevent typo problems with getting the value.
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
| private final MethodChannel methodChannel; | ||
| private final String javaScriptChannelName; | ||
|
|
||
| JavaScriptChannel(MethodChannel methodChannel, String javaScriptChannelName) { |
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.
nit: Can you also add docs explaining these params? I think it's just tricky enough that it's worth saying what they do here.
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
Platform implementation of the method channel API for adding and removing JavaScript channels. flutter#1116 adds the Dart side support, the current PR will land first. flutter/flutter#24837
Platform implementation of the method channel API for adding and removing JavaScript channels. flutter#1116 adds the Dart side support, the current PR will land first. flutter/flutter#24837
Platform implementation of the method channel API for adding and removing JavaScript channels. flutter#1116 adds the Dart side support, the current PR will land first. flutter/flutter#24837
…Session.abort() was removed.
Platform implementation of the method channel API for adding and removing JavaScript channels.
#1116 adds the Dart side support, the current PR will land first.
flutter/flutter#24837