withErrorText method

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

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
UserException withErrorText(String? newErrorText) {
  return UserException(
    message,
    reason: reason,
    code: code,
    ifOpenDialog: ifOpenDialog,
    errorText: newErrorText,
  );
}