MockResponse.timeout constructor

MockResponse.timeout([
  1. String message = 'Receive timeout'
])

A receive timeout (no HTTP response).

Implementation

factory MockResponse.timeout([String message = 'Receive timeout']) {
  return MockResponse(
    error: message,
    errorType: DioExceptionType.receiveTimeout,
  );
}