Skip to content

Conversation

@JSUYA
Copy link
Member

@JSUYA JSUYA commented Feb 24, 2023

Apply the changed interface from webview_flutter v4.0.2.

Other platforms use pigeon to create APIs and call the associated native APIs.
webview_flutter_tizen support the new interface while maintaining the existing method channel calls.
This change minimize changes to the tizen code in webview.cc while keeping method channel.

@JSUYA JSUYA force-pushed the dev/flutter_v4_method_channel branch 2 times, most recently from 78b77b0 to 86b92e4 Compare February 27, 2023 00:36
Copy link
Contributor

@bbrto21 bbrto21 left a comment

Choose a reason for hiding this comment

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

Generally, Looks good to me but I leave a few comments.
And I would appreciate it if you could briefly add the reason why Pigeon was not used or why it was implemented using MethodChannel in the PR description.

@bbrto21
Copy link
Contributor

bbrto21 commented Feb 27, 2023

I can't run the integration tests, am I missing something?

Copy link
Contributor

@bbrto21 bbrto21 left a comment

Choose a reason for hiding this comment

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

LGTM

Future<T?> _invokeChannelMethod<T>(String method, [dynamic arguments]) async {
if (!_isCreated) {
_pendingMethodCalls[method] = arguments;
return Future<T?>(() => null);
Copy link
Member

Choose a reason for hiding this comment

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

Maybe just

Suggested change
return Future<T?>(() => null);
return null;

Copy link
Member Author

Choose a reason for hiding this comment

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

done thank you

Copy link
Member

Choose a reason for hiding this comment

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

Just be aware that adding a method call that is expected to return a value to a pending list is actually a bit pointless (since the method will be executed later and the caller will not have an access to the return value).

_webview.loadRequest(params.uri.toString());
return;
case LoadRequestMethod.post:
break;
Copy link
Member

Choose a reason for hiding this comment

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

Post requests are not supported?

Copy link
Member Author

@JSUYA JSUYA Mar 10, 2023

Choose a reason for hiding this comment

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

The webview_flutter_tizen(ewk) did not support post request.
I've found an api related to this, but haven't yet checked that it works well.
After this patch is merged, I will make a separate PR.

@JSUYA JSUYA force-pushed the dev/flutter_v4_method_channel branch from 9eecdd5 to 1234085 Compare March 10, 2023 05:24
Copy link
Member

@swift-kim swift-kim left a comment

Choose a reason for hiding this comment

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

Looks good to me except for the following. Thanks for all your hard work!

@JSUYA JSUYA force-pushed the dev/flutter_v4_method_channel branch from 4096cc3 to fa53b24 Compare March 20, 2023 07:00
@JSUYA JSUYA merged commit 882cf43 into flutter-tizen:master Mar 21, 2023
@swift-kim
Copy link
Member

Will webview_flutter_lwe be updated as well or should we deprecate the package?

@JSUYA
Copy link
Member Author

JSUYA commented Mar 21, 2023

Will webview_flutter_lwe be updated as well or should we deprecate the package?

@swift-kim I will prepare a PR to upgrade webview_flutter_lwe.
It has not yet been decided whether this will be deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants