flutter_inappwebview logo

Flutter InAppWebView Share on Twitter Share on Facebook

Pub pub points popularity likes Awesome Flutter License

Donate to this project GitHub contributors GitHub forks GitHub stars

What is flutter_inappwebview? It’s a Flutter plugin that allows you to incorporate WebView widgets into your Flutter app, to use headless WebViews, or to use In-App browsers.

Latest Release: v5.3.2 Null safety

WebView integrated into the widget tree.

Adding the InAppWebView widget into your app is very simple. It’s just a widget like any other Flutter widget: InAppWebView(initialUrlRequest: URLRequest(url: Uri.parse("https://flutter.dev"))).

You can listen to a lot of events and use the InAppWebViewController to control your InAppWebView instances!

InAppWebView widget tree

Open An In-App Browser.

Use InAppBrowser or ChromeSafariBrowser to open an in-app browser! ChromeSafariBrowser is based on Chrome Custom Tabs on Android and on SFSafariViewController on iOS.

Create a Class that extends the InAppBrowser/ChromeSafariBrowser Class in order to override the callbacks to manage the browser events.

ChromeSafariBrowser

Use Headless WebViews.

It can be used to run a WebView in background without attaching an InAppWebView to the widget tree.

As InAppWebView, it has the same options and events. Use InAppWebViewController to control the headless WebView instance.

Headless InAppWebView

Main Classes Overview


InAppWebView

Flutter Widget for adding an inline native WebView integrated into the flutter widget tree.

ContextMenu

This class represents the WebView context menu.

HeadlessInAppWebView

Class that represents a WebView in headless mode. It can be used to run a WebView in background without attaching an InAppWebView to the widget tree.

InAppBrowser

In-App Browser using native WebView.

ChromeSafariBrowser

In-App Browser using Chrome Custom Tabs on Android / SFSafariViewController on iOS.

InAppLocalhostServer

This class allows you to create a simple server on http://localhost:[port]/. The default port value is 8080.

CookieManager

This class implements a singleton object (shared instance) which manages the cookies used by WebView instances.

HttpAuthCredentialDatabase

This class implements a singleton object (shared instance) that manages the shared HTTP auth credentials cache.

WebStorageManager

This class implements a singleton object (shared instance) which manages the web storage used by WebView instances.