withErrorText method

  1. @useResult
  2. @mustBeOverridden
  3. @override
UserException withErrorText(
  1. String? newErrorText
)
override

Adds (or replaces, if it already exists) the given newErrorText. If the newErrorText is null or empty, it will remove the errorText.

Implementation

@useResult
@mustBeOverridden
@override
UserException withErrorText(String? newErrorText) => AdvancedUserException(
      message,
      reason: reason,
      code: code,
      onOk: onOk,
      onCancel: onCancel,
      props: props,
      hardCause: hardCause,
      errorText: newErrorText,
      ifOpenDialog: ifOpenDialog,
    );