ProcessResult<T> class
Represents the result of a process operation with success status and optional message/object.
This class is used to encapsulate the result of operations that can succeed or fail, along with an optional message and result object.
Constructors
- ProcessResult({required bool success, required String? msg})
- Creates a result with explicit success status and message.
- ProcessResult.empty()
- Creates an empty success result with an empty message.
- ProcessResult.fail(String? msg)
- Creates a failure result with a message.
- ProcessResult.failureMsg(String? msg)
- Creates a failure result with a message.
- ProcessResult.success(T? obj)
- Creates a success result with an object.
- ProcessResult.successMsg(String? msg)
- Creates a success result with a message.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- msg ↔ String?
-
Optional message describing the result.
getter/setter pair
- obj ↔ T?
-
Optional result object.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- success ↔ bool
-
Whether the operation succeeded.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited