Response class Null safety

The interface of the Fetch API represents the response to a request. You can create a new object using the Response.Response() constructor, but you are more likely to encounter a object being returned as the result of another API operation—for example, a service worker FetchEvent.respondWith, or a simple fetch().

Implemented types
Available Extensions
Annotations

Constructors

Response([dynamic body, ResponseInit? init])
factory

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

error() Response
json(dynamic data, [ResponseInit? init]) Response
redirect(String url, [int? status = 302]) Response