when<TResult extends Object?> method

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

Implementation

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