Client constructor

Client({
  1. required String baseURL,
  2. Map<String, dynamic>? headers,
  3. bool showLogging = true,
  4. Function? handleWhenUnauthorized,
  5. Duration? connectTimeout,
  6. Duration? receiveTimeout,
  7. List<int>? hitCacheOnErrorExcept,
  8. Duration? maxStaleCache,
  9. dynamic handleOnRequest(
    1. RequestOptions requestOptions
    )?,
  10. dynamic handleOnResponse(
    1. Response response
    )?,
  11. dynamic handleOnError(
    1. DioException err,
    2. ErrorInterceptorHandler handler
    )?,
  12. dynamic handleFilterLog(
    1. RequestOptions options,
    2. FilterArgs args
    )?,
  13. bool useCache = false,
})

Implementation

Client(
    {required this.baseURL,
    this.headers,
    this.showLogging = true,
    this.handleWhenUnauthorized,
    this.connectTimeout,
    this.receiveTimeout,
    this.hitCacheOnErrorExcept,
    this.maxStaleCache,
    this.handleOnRequest,
    this.handleOnResponse,
    this.handleOnError,
    this.handleFilterLog,
    this.useCache = false});