maybeMap<R extends Object?> method

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

Implementation

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