flutter_webview_plugin 0.0.9 copy "flutter_webview_plugin: ^0.0.9" to clipboard
flutter_webview_plugin: ^0.0.9 copied to clipboard

outdatedDart 1 only

Plugin that allow Flutter to communicate with a native Webview.

flutter_webview_plugin #

Plugin that allow Flutter to communicate with a native WebView.

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

  • Android
  • IOS

Getting Started #

For help getting started with Flutter, view our online documentation.

How it works #

Launch WebView with variable url

void launchWebView(String url) sync {
  var flutterWebviewPlugin = new FlutterWebviewPlugin();  
  
  flutterWebviewPlugin.launch(url);  
  
  // Wait in this async function until destroy of WebView.
  await flutterWebviewPlugin.onDestroy.first;
}

Close launched WebView #

void launchWebViewAndCloseAfterWhile(String url) {
  var flutterWebviewPlugin = new FlutterWebviewPlugin();  
  
  flutterWebviewPlugin.launch(url);  
  
  // After 10 seconds.
  new Timer(const Duration(seconds: 10), () {
    // Close WebView.
    // This will also emit the onDestroy event.
    flutterWebviewPlugin.close();
  });
}

Android #

Add the Activity to you AndroidManifest.xml:

<activity android:name="com.flutter_webview_plugin.WebviewActivity" android:parentActivityName=".MainActivity"/>

iOS #

No extra configuration is needed.

715
likes
0
pub points
98%
popularity

Publisher

verified publisherfluttercommunity.dev

Plugin that allow Flutter to communicate with a native Webview.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_webview_plugin