onOk property

VoidCallback? onOk
inherited

"OK" callback. If the exception has a cause, will return a merged callback.

Implementation

VoidCallback? get onOk {
  VoidCallback? onOkCause = (cause is UserException) ? (cause as UserException).onOk : null;

  if (onOkCause == null)
    return _onOk;
  else if (_onOk == null)
    return onOkCause;
  else
    return () {
      _onOk!();
      onOkCause();
    };
}