Result<T> class
Constructors
- Result({required bool isSuccess, T? value, String? errorKey, String? errorMessage})
- Result.failure(String errorKey, String errorMessage)
- Result.success(T value)
Properties
- errorKey → String?
-
final
- errorMessage → String?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isSuccess → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- toOptional → T?
-
no setter
- value → T?
-
final
Methods
-
flatMap<
R> (Result< R> f(T)) → Result<R> -
map<
R> (R f(T)) → Result< R> -
mapFailure(
$< String, String> f(String errorKey, String errorMessage)) → Result<T> -
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