WebResourceRequest class

Class representing a resource request of the WebView used by the event WebView.androidShouldInterceptRequest. NOTE: available only on Android.

Official Android API: https://developer.android.com/reference/android/webkit/WebResourceRequest


WebResourceRequest({required Uri url, Map<String, String>? headers, required String? method, required bool? hasGesture, required bool? isForMainFrame, required bool? isRedirect})


hasGesture bool?
Gets whether a gesture (such as a click) was associated with the request. For security reasons in certain situations this method may return false even though the sequence of events which caused the request to be created was initiated by a user gesture.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>?
The headers associated with the request.
getter/setter pair
isForMainFrame bool?
Whether the request was made in order to fetch the main frame's document.
getter/setter pair
isRedirect bool?
Whether the request was a result of a server-side redirect.
getter/setter pair
method String?
The method associated with the request, for example GET.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url Uri
The URL for which the resource request was made.
getter/setter pair


noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
toJson() Map<String, dynamic>
toMap() Map<String, dynamic>
toString() String
A string representation of this object.


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

Static Methods

fromMap(Map<String, dynamic>? map) WebResourceRequest?