ConnectionParameters class

Configuration for HTTP connection and request timeouts used by DefaultCacheManager when downloading files.

Both timeouts are optional. When the entire ConnectionParameters object is null (the default), the cache manager preserves its current behaviour of waiting indefinitely.

Example:

DefaultCacheManager(
  connectionParameters: ConnectionParameters(
    connectionTimeout: Duration(seconds: 10),
    requestTimeout: Duration(seconds: 30),
  ),
)
Annotations

Constructors

ConnectionParameters({Duration? connectionTimeout, Duration? requestTimeout})
Creates connection parameters for the cache manager.

Properties

connectionTimeout Duration?
Maximum duration to wait for the server to respond with headers.
final
hashCode int
The hash code for this object.
no setteroverride
requestTimeout Duration?
Maximum duration to wait between consecutive data chunks during the response stream.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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