WebResourceResponse class

Class representing a resource response of the WebView.

Constructors

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

Properties

contentEncoding String?
The resource response's encoding. The default value is utf-8.
getter/setter pair
contentType String?
The resource response's MIME type, for example text/html.
getter/setter pair
data Uint8List?
The data provided by the resource response.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>?
The headers for the resource response. If headers isn't null, then you need to set also statusCode and reasonPhrase.
getter/setter pair
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.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
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.
getter/setter pair

Methods

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

Operators

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

Static Methods

fromMap(Map<String, dynamic>? map) WebResourceResponse?
Gets a possible WebResourceResponse instance from a Map value.