ApiException.custom constructor

ApiException.custom({
  1. required String message,
  2. ApiExceptionType type = ApiExceptionType.unknown,
  3. int? statusCode,
  4. dynamic originalError,
  5. StackTrace? stackTrace,
  6. Map<String, dynamic>? errorData,
})

Create custom ApiException

Implementation

factory ApiException.custom({
  required String message,
  ApiExceptionType type = ApiExceptionType.unknown,
  int? statusCode,
  dynamic originalError,
  StackTrace? stackTrace,
  Map<String, dynamic>? errorData,
}) {
  return ApiException(
    message: message,
    type: type,
    statusCode: statusCode,
    originalError: originalError,
    stackTrace: stackTrace,
    errorData: errorData,
  );
}