Success<TSuccess> class
Constructors
-
Success(TSuccess _value)
-
Constructs a new Success instance.
const
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
-
fold<T>(T onError(Failure error), T onSuccess(TSuccess r))
→ T
-
Executes the provided functions based on the result's state.
override
-
getError()
→ Failure
-
Returns the error value if the result is an error,
otherwise throws an exception.
inherited
-
getSuccess()
→ TSuccess
-
Returns the success value if the result is a success,
otherwise calls
orElse with the error value and returns its result.
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited