use_case library
Classes
-
UseCase<
T> -
The result of running a use case: either a UseCaseSuccess holding
T, or a UseCaseFailure holding a UseCaseException. -
UseCaseFailure<
T> - A failed use case carrying a UseCaseException.
-
UseCaseSuccess<
T> -
A successful use case carrying a value of type
T.
Functions
-
cast<
T> (dynamic x) → T? -
Casts
xtoTif it is of that type, otherwise returns null. -
useCase<
T> (Future< T> request()) → Future<UseCase< T> > -
Executes the given async
requestand returns a UseCase with the result. -
useCaseSync<
T> (T request()) → UseCase< T> -
Executes the given sync
requestand returns a UseCase with the result.
Exceptions / Errors
- UnexpectedUseCaseException
- Exception raised when an unexpected error escapes a useCase body.
- UseCaseException
- Base class for exceptions surfaced through a UseCase.