説明なし

Lejard Hadrien 39225b2919 use yaml extension 8 年 前
android d9c3c47e8f use standard Activity as calling class to support FlutterFragmentActivity as well as the default FragmentActivity 8 年 前
example f445329687 implement on url changed 8 年 前
ios d06a18ca31 FIX: trigger onDestroy and hide topBar in fullScree mode 8 年 前
lib c873ecec72 version 0.0.8 8 年 前
.gitignore 4e3488bc16 iOS web view plugin 8 年 前
CHANGELOG.md d9c3c47e8f use standard Activity as calling class to support FlutterFragmentActivity as well as the default FragmentActivity 8 年 前
LICENSE feb642eaf0 first commit 8 年 前
README.md 0d1898af4a Add comments, add previews to README 8 年 前
analysis_options.yaml 39225b2919 use yaml extension 8 年 前
flutter_webview_plugin.iml feb642eaf0 first commit 8 年 前
pubspec.yaml b709664dcb rename analysis_options 8 年 前

README.md

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.