whenOrNull<R extends Object?> method
R?
whenOrNull<R extends Object?>({
- R doNothing()?,
- R orElse(
- EditFormUIAction editFormUIAction
Implementation
R? whenOrNull<R extends Object?>({
R Function()? doNothing,
R Function(EditFormUIAction editFormUIAction)? orElse,
}) {
final editFormUIAction = this;
if (editFormUIAction is EditFormUIActionDoNothing) {
return doNothing != null ? doNothing() : orElse?.call(editFormUIAction);
} else {
throw AssertionError();
}
}