BlockStoreResult<T> class

A generic result returned by block store operations.

succeeded indicates whether the operation completed as expected. value holds the payload, and message provides a human-readable description.

Constructors

BlockStoreResult({required bool succeeded, required T value, String? message})
Creates a result.
const
BlockStoreResult.failure(T value, {String? message})
Creates a failed result.
factory
BlockStoreResult.success(T value, {String? message})
Creates a successful result.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
message String?
Optional human-readable message.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
succeeded bool
Whether the operation succeeded.
final
value → T
The operation payload.
final

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