fluttercommunity / flutter_webview_plugin

Community WebView Plugin - Allows Flutter to communicate with a native WebView.
https://pub.dev/packages/flutter_webview_plugin
Other
1.48k stars 929 forks source link

Migrate to flutterEmbedding v2 with null safety #941

Open snoopdoggy322 opened 2 years ago

abdelaziz-mahdy commented 2 years ago

i really dont know what is the cause

but upon using your github respositery

this error happens when app comes back from the background

W/FlutterJNI( 1369): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter_webview_plugin. Response ID: 2
W/FlutterJNI( 1369): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter_webview_plugin. Response ID: 3
W/FlutterJNI( 1369): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter_webview_plugin. Response ID: 4
W/FlutterJNI( 1369): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter_webview_plugin. Response ID: 5
W/FlutterJNI( 1369): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter_webview_plugin. Response ID: 6
W/FlutterJNI( 1369): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter_webview_plugin. Response ID: 7
W/FlutterJNI( 1369): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter_webview_plugin. Response ID: 8
W/FlutterJNI( 1369): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter_webview_plugin. Response ID: 9
W/FlutterJNI( 1369): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter_webview_plugin. Response ID: 10
W/FlutterJNI( 1369): Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: flutter_webview_plugin. Response ID: 11

i tried changing parts of the activity part with no results

@snoopdoggy322

MarisB commented 2 years ago

Hi. Can you make one bugfix please. In file lib/src/base.dart line 370 make navigationType nullable: final int? navigationType;

Bhagat8533 commented 1 year ago

You can use my repo - https://github.com/fluttercommunity/flutter_webview_plugin/issues/940#issuecomment-1186431094