WebViewAndroidWebViewClient class
Receives various navigation requests and errors for WebViewAndroidPlatformController.
When handling navigation requests, this calls onNavigationRequestCallback
when a android_webview.WebView
attempts to navigate to a new page. If
this callback return true, this calls loadUrl.
Constructors
- WebViewAndroidWebViewClient({required void onPageStartedCallback(String url), required void onPageFinishedCallback(String url), required void onWebResourceErrorCallback(WebResourceError error)})
- Creates a WebViewAndroidWebViewClient that doesn't handle navigation requests.
- Creates a WebViewAndroidWebViewClient that handles navigation requests.
Properties
-
Whether this
android_webview.WebViewClient
handles navigation requests.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
-
loadUrl
→ Future<
void> Function(String url, Map<String, String> ? headers)? -
Callback when a navigation request is approved.
final
-
Checks whether a navigation request should be approved or disaproved.
final
- onPageFinishedCallback → void Function(String url)
-
Callback when
android_webview.WebViewClient
receives a callback fromandroid_webview.WebViewClient
.onPageFinished.final - onPageStartedCallback → void Function(String url)
-
Callback when
android_webview.WebViewClient
receives a callback fromandroid_webview.WebViewClient
.onPageStarted.final - onWebResourceErrorCallback ↔ void Function(WebResourceError error)
-
Callback when
android_webview.WebViewClient
receives an error callback.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldOverrideUrlLoading → bool
-
Whether loading a url should be overridden.
finalinherited
Methods
-
copy(
) → WebViewClient -
Instantiates and returns a functionally identical object to oneself.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onPageFinished(
WebView webView, String url) → void - Notify the host application that a page has finished loading.
-
onPageStarted(
WebView webView, String url) → void - Notify the host application that a page has started loading.
-
onReceivedError(
WebView webView, int errorCode, String description, String failingUrl) → void - Report an error to the host application.
-
onReceivedRequestError(
WebView webView, WebResourceRequest request, WebResourceError error) → void - Report web resource loading error to the host application.
-
requestLoading(
WebView webView, WebResourceRequest request) → void -
When a URL is about to be loaded in the current
WebView
. -
toString(
) → String -
A string representation of this object.
inherited
-
urlLoading(
WebView webView, String url) → void -
When a URL is about to be loaded in the current
WebView
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited