FutureWhen<T> extension
Extension methods for Future and Stream to handle loading, error, and data states.
- on
-
- Future<
T>
- Future<
Methods
-
maybeWhen(
{required Widget orElse(), Widget ready(T data)?, Widget error(Object error, StackTrace stack)?, Widget loading()?}) → Widget -
Available on Future<
Handles the different states of the Future with an orElse fallback.T> , provided by the FutureWhen extension -
when(
{required Widget ready(T data), required Widget loading(), required Widget error(Object error, StackTrace stack)}) → Widget -
Available on Future<
Handles the different states of the Future: loading, error, and data ready.T> , provided by the FutureWhen extension