Failure class abstract

An abstract base class representing a failure or error state within the application.

This class is extended to define specific failure types and allows for error messages and a list of error details to be provided.

It also supports translation or transformation of the message through the trMessage method.

Implementers

Constructors

Failure.new({required String message, required List<String> errors})
Constructs a Failure with a required message and errors list.
const

Properties

errors List<String>
A list of detailed error messages related to the failure.
final
hashCode int
The hash code for this object.
no setterinherited
message String
A general message describing the failure.
final
props List<Object>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
trMessage() Failure
Returns a translated or modified version of the current failure.

Operators

operator ==(Object other) bool
The equality operator.
inherited