Result<T> class sealed

Wraps the outcome of an operation (typically a repository/data-source call) as either Success or Failure, for use with Dart 3 pattern matching (switch) instead of throwing.

Implementers

Constructors

Result.failure(Object error)
const
factory
Result.success(T data)
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
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