Няма описание

pedia a3ccf62e54 ios: remove event channel преди 8 години
android a3ccf62e54 ios: remove event channel преди 8 години
example a3ccf62e54 ios: remove event channel преди 8 години
ios a3ccf62e54 ios: remove event channel преди 8 години
lib a3ccf62e54 ios: remove event channel преди 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.