partialMap method

  1. @Deprecated('Use `mapOrNull` instead. Will be removed by next release.')
void partialMap({
  1. void doNothing(
    1. EditFormUIActionDoNothing doNothing
    )?,
  2. void orElse(
    1. EditFormUIAction editFormUIAction
    )?,
})

Implementation

@Deprecated('Use `mapOrNull` instead. Will be removed by next release.')
void partialMap({
  void Function(EditFormUIActionDoNothing doNothing)? doNothing,
  void Function(EditFormUIAction editFormUIAction)? orElse,
}) {
  final editFormUIAction = this;
  if (editFormUIAction is EditFormUIActionDoNothing) {
    if (doNothing != null) {
      doNothing(editFormUIAction);
    } else if (orElse != null) {
      orElse(editFormUIAction);
    }
  } else {
    throw AssertionError();
  }
}