UserException constructor

const UserException(
  1. String? message, {
  2. int? code,
  3. String? reason,
  4. bool ifOpenDialog = true,
  5. String? errorText,
})

Creates a UserException, given a message message of type String, a reason of type String or UserException, and an optional numeric code. All fields are optional, but usually at least the message or code is provided.

If ifOpenDialog is false, the UserExceptionDialog will not show the dialog. The default is true, which usually means the error should be shown as state in the screen.

Implementation

const UserException(
  this.message, {
  this.code,
  this.reason,
  this.ifOpenDialog = true,
  this.errorText,
});