mapOrNull<TResult extends Object?> method

  1. @optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
  1. TResult requestCancelled(
    1. RequestCancelled value
    )?,
  2. TResult unauthorizedRequest(
    1. UnauthorizedRequest value
    )?,
  3. TResult badRequest(
    1. BadRequest value
    )?,
  4. TResult notFound(
    1. NotFound value
    )?,
  5. TResult methodNotAllowed(
    1. MethodNotAllowed value
    )?,
  6. TResult notAcceptable(
    1. NotAcceptable value
    )?,
  7. TResult requestTimeout(
    1. RequestTimeout value
    )?,
  8. TResult sendTimeout(
    1. SendTimeout value
    )?,
  9. TResult conflict(
    1. Conflict value
    )?,
  10. TResult internalServerError(
    1. InternalServerError value
    )?,
  11. TResult notImplemented(
    1. NotImplemented value
    )?,
  12. TResult serviceUnavailable(
    1. ServiceUnavailable value
    )?,
  13. TResult noInternetConnection(
    1. NoInternetConnection value
    )?,
  14. TResult formatException(
    1. FormatException value
    )?,
  15. TResult unableToProcess(
    1. UnableToProcess value
    )?,
  16. TResult defaultError(
    1. DefaultError value
    )?,
  17. TResult unexpectedError(
    1. UnexpectedError value
    )?,
})
inherited

Implementation

@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
  TResult Function(RequestCancelled value)? requestCancelled,
  TResult Function(UnauthorizedRequest value)? unauthorizedRequest,
  TResult Function(BadRequest value)? badRequest,
  TResult Function(NotFound value)? notFound,
  TResult Function(MethodNotAllowed value)? methodNotAllowed,
  TResult Function(NotAcceptable value)? notAcceptable,
  TResult Function(RequestTimeout value)? requestTimeout,
  TResult Function(SendTimeout value)? sendTimeout,
  TResult Function(Conflict value)? conflict,
  TResult Function(InternalServerError value)? internalServerError,
  TResult Function(NotImplemented value)? notImplemented,
  TResult Function(ServiceUnavailable value)? serviceUnavailable,
  TResult Function(NoInternetConnection value)? noInternetConnection,
  TResult Function(FormatException value)? formatException,
  TResult Function(UnableToProcess value)? unableToProcess,
  TResult Function(DefaultError value)? defaultError,
  TResult Function(UnexpectedError value)? unexpectedError,
}) =>
    throw _privateConstructorUsedError;