WebResourceRequest class Null safety

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.
read / write
hashCode int
The hash code for this object.
read-only, inherited
headers Map<String, String>?
The headers associated with the request.
read / write
isForMainFrame bool?
Whether the request was made in order to fetch the main frame's document.
read / write
isRedirect bool?
Whether the request was a result of a server-side redirect.
read / write
method String?
The method associated with the request, for example GET.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
url Uri
The URL for which the resource request was made.
read / write


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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?