WebResourceResponse class Null safety

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

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

Constructors

WebResourceResponse({String contentType = "", String contentEncoding = "utf-8", Uint8List? data, Map<String, String>? headers, int? statusCode, String? reasonPhrase})

Properties

contentEncoding String
The resource response's encoding. The default value is utf-8.
read / write
contentType String
The resource response's MIME type, for example text/html.
read / write
data Uint8List?
The data provided by the resource response.
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
headers Map<String, String>?
The headers for the resource response. If headers isn't null, then you need to set also statusCode and reasonPhrase. [...]
read / write
reasonPhrase String?
The phrase describing the status code, for example "OK". Must be non-empty. If reasonPhrase is set, then you need to set also headers and reasonPhrase. This value cannot be null. [...]
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
statusCode int?
The status code needs to be in the ranges 100, 299, 400, 599. Causing a redirect by specifying a 3xx code is not supported. If statusCode is set, then you need to set also headers and reasonPhrase. This value cannot be null. [...]
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, dynamic>
toMap() Map<String, dynamic>
toString() String
A string representation of this object. [...]
override

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited