Result<T> class
sealed
Outcome of any brix call: Success or Failed, nothing else.
switch (result) {
case Success(:final data): ...
case Failed(failure: NetworkFailure()): ...
case Failed(:final failure): ...
}
Properties
- dataOrNull → T?
-
The data on success, otherwise null.
no setter
- failureOrNull → Failure?
-
The failure when failed, otherwise null.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isFailed → bool
-
no setter
- isSuccess → bool
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited