ApiResult<T> class
Simple wrapper of server response indicating if request was successful or not
Constructors
- ApiResult.new({required bool succeeded, T? value, Exception? error})
- ApiResult.failed(Exception error)
-
factory
- ApiResult.success(T value)
-
factory
Properties
- error → Exception?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- succeeded → bool
-
final
- value → T?
-
final
- valueUnsafe → T
-
no setter
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