RequestController constructor
RequestController({
- Duration? timeout,
- PartialTimeouts? partialTimeouts,
Creates a new RequestController.
Optionally, a default timeout
may be specified for requests on this
controller. If no timeout is specified, requests will never timeout.
See timeout
for more details.
For more granular control over timeouts, partialTimeouts
may be
specified in addition to, or instead of, timeout
. These can be used
to control the timeout for individual parts of a request's lifecycle.
For instance, you may wish to abort a request if it takes too long to connect, but once it has connected, you may wish to allow the request to take as long as it needs to send and receive data.
Implementation
RequestController({this.timeout, PartialTimeouts? partialTimeouts})
: _lifecycleTimeouts = partialTimeouts;