connectTimeout property
Duration?
get
connectTimeout
Timeout when opening a request.
Throws the DioException with DioExceptionType.connectionTimeout type when time out.
null
or Duration.zero
means no timeout limit.
Implementation
Duration? get connectTimeout => _connectTimeout;
set
connectTimeout
(Duration? value)
Implementation
set connectTimeout(Duration? value) {
if (value != null && value.isNegative) {
throw StateError('connectTimeout should be positive');
}
_connectTimeout = value;
}