Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS delegate and some features #20

Merged
merged 15 commits into from
Dec 20, 2017
Merged

iOS delegate and some features #20

merged 15 commits into from
Dec 20, 2017

Conversation

pedia
Copy link
Contributor

@pedia pedia commented Dec 18, 2017

iOS:

  • add Delegate, same as the event of android.

iOS/Android:

  • eval javascript
  • user agent setting
  • state change event
  • embed view (not fullscreen)
  • hidden

Add document for argument.

@lejard-h
Copy link
Collaborator

looks nicer ^^, sorry December is a busy month, I will try to take care of this today

Copy link
Collaborator

@lejard-h lejard-h left a comment

Choose a reason for hiding this comment

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

Awesome,
I commented for a small change,
It works great on iOS, but I have some errors on Android :

PlatformException(error, Attempt to invoke virtual method 'void android.view.ViewGroup.removeView(android.view.View)' on a null object reference, null)
[        ] E/flutter ( 4016): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:514)
[        ] E/flutter ( 4016): #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:154)
[        ] E/flutter ( 4016): <asynchronous suspension>
[        ] E/flutter ( 4016): #2      FlutterWebViewPlugin.close (package:flutter_webview_plugin/flutter_webview_plugin.dart:140)

I have this exception when I try to close a hidden wehbview, and for a fullscreen view the back navigation is broken.

You can add you name to the pubspec and update the version to 0.0.10, you can also update the CHANGELOG, great work thanks.

Tell me if you prefer to merge this, I can take care of the Android part.


// On destroy stream
StreamSubscription _onDestroy;

// On urlChanged stream
StreamSubscription<String> _onUrlChanged;

TextEditingController _ctrl =
new TextEditingController(text: "https://flutter.io");
StreamSubscription<String> _onStateChanged;
Copy link
Collaborator

Choose a reason for hiding this comment

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

you should cancel the subscription

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK

Copy link
Collaborator

@lejard-h lejard-h left a comment

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants