Skip to content

IOBoolOps

extension IOBoolOps on IO<bool>

Extension providing conditional operators for boolean-yielding IOs.

Methods

ifM() extension

IO<B> ifM<B>(IO<B> Function() ifTrue, IO<B> Function() ifFalse)

Evaluates this IO to a boolean. If true, evaluating ifTrue. Otherwise evaluates ifFalse.

Available on IO<A>, provided by the IOBoolOps extension

Implementation
dart
IO<B> ifM<B>(Function0<IO<B>> ifTrue, Function0<IO<B>> ifFalse) =>
    _ifM(ifTrue, ifFalse).traced('ifM');