ConnectionManagerStub<E extends Decodable> constructor

ConnectionManagerStub<E extends Decodable>({
  1. int? responseStatusCode,
  2. bool awaitResponse = true,
  3. E decodeErrorFromMap(
    1. int statusCode,
    2. Map<String, dynamic> data
    )?,
  4. int? mapStatusCodeFromResponse(
    1. Map<String, dynamic>? data
    )?,
  5. Future<String?> onTokenExpired()?,
  6. void onResponseReceived(
    1. Response response
    )?,
  7. bool returnCatchedErrorMessage = true,
})

Implementation

ConnectionManagerStub({
  int? responseStatusCode,
  this.awaitResponse = true,
  super.decodeErrorFromMap,
  super.mapStatusCodeFromResponse,
  super.onTokenExpired,
  super.onResponseReceived,
  super.returnCatchedErrorMessage = true,
}) : super(
        baseUrl: "",
        constantHeaders: {},
      ) {
  _responseStatusCode = responseStatusCode ?? 200;
}