whenOrNull<TResult extends Object?> method

  1. @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
  1. TResult? ok(
    1. Object? result
    )?,
  2. TResult? fail(
    1. PandoraApiErrorCode code,
    2. String message
    )?,
})
inherited

Implementation

@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
  TResult? Function(@JsonKey(name: 'result') Object? result)? ok,
  TResult? Function(
          @JsonKey(name: 'code', fromJson: PandoraApiErrorCode.fromCode)
          PandoraApiErrorCode code,
          @JsonKey(name: 'message') String message)?
      fail,
}) =>
    throw _privateConstructorUsedError;