AndroidInAppWebViewController class

Class represents the Android controller that contains only android-specific methods for the WebView.


AndroidInAppWebViewController({required MethodChannel channel})


hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited


clearHistory() Future<void>
Clears the internal back/forward list.
clearSslPreferences() Future<void>
Clears the SSL preferences table stored in response to proceeding with SSL certificate errors.
getOriginalUrl() Future<Uri?>
Use InAppWebViewController.getOriginalUrl instead.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
pageDown({required bool bottom}) Future<bool>
Scrolls the contents of this WebView down by half the page size. Returns true if the page was scrolled.
pageUp({required bool top}) Future<bool>
Scrolls the contents of this WebView up by half the view size. Returns true if the page was scrolled.
pause() Future<void>
Does a best-effort attempt to pause any processing that can be paused safely, such as animations and geolocation. Note that this call does not pause JavaScript. To pause JavaScript globally, use InAppWebViewController.pauseTimers. To resume WebView, call resume.
resume() Future<void>
Resumes a WebView after a previous call to pause.
startSafeBrowsing() Future<bool>
Starts Safe Browsing initialization.
toString() String
A string representation of this object.
zoomIn() Future<bool>
Performs zoom in in this WebView. Returns true if zoom in succeeds, false if no zoom changes.
zoomOut() Future<bool>
Performs zoom out in this WebView. Returns true if zoom out succeeds, false if no zoom changes.


operator ==(Object other) bool
The equality operator.

Static Methods

clearClientCertPreferences() Future<void>
Clears the client certificate preferences stored in response to proceeding/cancelling client cert requests. Note that WebView automatically clears these preferences when the system keychain is updated. The preferences are shared by all the WebViews that are created by the embedder application.
getCurrentWebViewPackage() Future<AndroidWebViewPackageInfo?>
If WebView has already been loaded into the current process this method will return the package that was used to load it. Otherwise, the package that would be used if the WebView was loaded right now will be returned; this does not cause WebView to be loaded, so this information may become outdated at any time. The WebView package changes either when the current WebView package is updated, disabled, or uninstalled. It can also be changed through a Developer Setting. If the WebView package changes, any app process that has loaded WebView will be killed. The next time the app starts and loads WebView it will use the new WebView package instead.
getSafeBrowsingPrivacyPolicyUrl() Future<Uri?>
Returns a URL pointing to the privacy policy for Safe Browsing reporting.
setSafeBrowsingWhitelist({required List<String> hosts}) Future<bool>
Sets the list of hosts (domain names/IP addresses) that are exempt from SafeBrowsing checks. The list is global for all the WebViews.
setWebContentsDebuggingEnabled(bool debuggingEnabled) Future<void>
Enables debugging of web contents (HTML / CSS / JavaScript) loaded into any WebViews of this application. This flag can be enabled in order to facilitate debugging of web layouts and JavaScript code running inside WebViews. Please refer to WebView documentation for the debugging guide. The default is false.