Success<T> class
A successful result containing data.
- Inheritance
-
- Object
- SecurityResult<
T> - Success
Constructors
- Success(T data)
-
const
Properties
- data → T
-
final
- dataOrNull → T?
-
Returns the data if Success, otherwise
null.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- isFailure → bool
-
Returns
trueif this result is a Failure.no setterinherited - isSuccess → bool
-
Returns
trueif this result is a Success.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
fold<
R> ({required R onSuccess(T data), required R onFailure(SecurityException error)}) → R -
Pattern-matches on this result, returning a value from the
appropriate callback.
inherited
-
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