|
|
8 years ago | |
|---|---|---|
| android | 8 years ago | |
| example | 8 years ago | |
| ios | 8 years ago | |
| lib | 8 years ago | |
| .gitignore | 8 years ago | |
| CHANGELOG.md | 8 years ago | |
| LICENSE | 8 years ago | |
| README.md | 8 years ago | |
| analysis_options.yaml | 8 years ago | |
| flutter_webview_plugin.iml | 8 years ago | |
| pubspec.yaml | 8 years ago |
Plugin that allow Flutter to communicate with a native WebView.
For help getting started with Flutter, view our online documentation.
On Android, add the Activity to you AndroidManifest.xml:
<activity android:name="com.flutter_webview_plugin.WebviewActivity" android:parentActivityName=".MainActivity"/>
For Android, it will launch a new Activity inside the App with the Webview inside. Does not allow to integrate a Webview inside a Flutter Widget
For IOS, it will launch a new UIViewController inside the App with the UIWebView inside. Does not allow to integrate a Webview inside a Flutter Widget
final flutterWebviewPlugin = new FlutterWebviewPlugin();
flutterWebviewPlugin.launch(url);
final flutterWebviewPlugin = new FlutterWebviewPlugin();
flutterWebviewPlugin.launch(url);
....
// Close WebView.
// This will also emit the onDestroy event.
flutterWebviewPlugin.close();
final flutterWebviewPlugin = new FlutterWebviewPlugin();
flutterWebviewPlugin.launch(url, hidden: true);
final flutterWebviewPlugin = new FlutterWebviewPlugin();
flutterWebviewPlugin.launch(url,
fullScreen: false,
rect: new Rect.fromLTWH(
0.0,
0.0,
MediaQuery.of(context).size.width,
300.0));
Stream<Null> onDestroyStream<String> onUrlChangedStream<Null> onBackPressedStream<WebViewStateChanged> onStateChangedDon't forget to dispose webview
flutterWebviewPlugin.dispose()