maybeWhen<R extends Object?> method

R maybeWhen<R extends Object?>({
  1. R doNothing()?,
  2. required R orElse(
    1. EditFormUIAction editFormUIAction
    ),
})

Implementation

R maybeWhen<R extends Object?>({
  R Function()? doNothing,
  required R Function(EditFormUIAction editFormUIAction) orElse,
}) {
  final editFormUIAction = this;
  if (editFormUIAction is EditFormUIActionDoNothing) {
    return doNothing != null ? doNothing() : orElse(editFormUIAction);
  } else {
    throw AssertionError();
  }
}