a5be2c59be
The other CookieManager implementations in Flutter allow for no domain, as the Android CookieManager implementation. By providing a default domain, applications cannot opt-out of the default CookieManager.setCookie behaviour (which prepends a "period" to the domain), which is treated as a different domain by Webkit on Android. This leads to multiple cookies for the same URL if the server serves a cookie without a domain, or with a domain that does not contain a leading period. Note, iOS's setCookie doesn't take a url parameter (at least in the way it's called from flutter_inappwebview) and instead this is passed an attribute on the HTTPCookie object itself (originURL). When constructing a HTTPCookie you must supply either originURL OR domain. Both a permitted, but at least one must be present. [1] By making domain optional, without a default, on both platforms, consumers can now set cookies that don't use the domain attribute but still allows for setting a domain when required. [1] https://developer.apple.com/documentation/foundation/httpcookie/1392975-init |
||
---|---|---|
.github | ||
.gradle | ||
android | ||
example | ||
ios | ||
lib | ||
nodejs_server_test_auth_basic_and_ssl | ||
scripts | ||
tool | ||
.gitignore | ||
CHANGELOG.md | ||
LICENSE | ||
README.md | ||
flutter_inappwebview.iml | ||
flutter_inappwebview_android.iml | ||
pubspec.yaml |
README.md
Flutter InAppWebView Plugin
A Flutter plugin that allows you to add an inline webview, to use an headless webview, and to open an in-app browser window.
Articles/Resources
- Official documentation: inappwebview.dev/docs
- Read the online API Reference to get the full API documentation.
- Official blog: inappwebview.dev/blog
- Find open source projects on the Official Showcase page: inappwebview.dev/showcase
- Check the example/integration_test/webview_flutter_test.dart file for other code examples
- Flutter Browser App: A Full-Featured Mobile Browser App (such as the Google Chrome mobile browser) created using Flutter and the features offered by the flutter_inappwebview plugin
Showcase - Who use it
Check the Showcase page to see an open list of Apps built with Flutter and Flutter InAppWebView.
Are you using the Flutter InAppWebView plugin and would you like to add your App there?
Send a submission request to the Submit App page!
Requirements
- Dart sdk: ">=2.14.0 <3.0.0"
- Flutter: ">=2.5.0"
- Android:
minSdkVersion 17
and add support forandroidx
(see AndroidX Migration to migrate an existing app) - iOS:
--ios-language swift
, Xcode version>= 12
Installation
Add flutter_inappwebview
as a dependency in your pubspec.yaml file.
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.
Support
Did you find this plugin useful? Please consider to make a donation to help improve it!