DioException.connectionTimeout constructor

DioException.connectionTimeout({
  1. required Duration timeout,
  2. required RequestOptions requestOptions,
  3. Object? error,
})

Implementation

factory DioException.connectionTimeout({
  required Duration timeout,
  required RequestOptions requestOptions,
  Object? error,
}) =>
    DioException(
      type: DioExceptionType.connectionTimeout,
      requestOptions: requestOptions,
      response: null,
      error: error,
      message: 'The request connection took longer than $timeout '
          'and it was aborted. '
          'To get rid of this exception, try raising the '
          'RequestOptions.connectTimeout above the duration of $timeout or '
          'improve the response time of the server.',
    );