PartialTimeouts class final

Encapsulates timeouts for individual parts of a request's lifecycle.

Constructors

PartialTimeouts({Duration? connectTimeout, Duration? sendTimeout, Duration? receiveTimeout})
Creates a new PartialTimeouts.
const
PartialTimeouts.all(Duration timeout)
Creates a new PartialTimeouts with all timeouts set to the specified timeout.
const

Properties

connectTimeout Duration?
The duration to wait for a connection to be successfully opened with a server before aborting the request.
final
hashCode int
The hash code for this object.
no setterinherited
receiveTimeout Duration?
The duration to wait for a response to be received from the server before aborting the request.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sendTimeout Duration?
The duration to wait for the request data to be sent to the server before aborting the request.
final

Methods

forState(RequestLifecycleState state) Duration?
Returns the timeout for the specified state if there is one specified, otherwise returns null.
hasForState(RequestLifecycleState state) bool
Returns true if a timeout is specified for the specified state. Returns false otherwise.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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