withErrorText method
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,
);
}