untilDoneLoading function

FutureOr<void> untilDoneLoading(
  1. BaseResourceBloc<Object, dynamic> bloc
)

Returns a future that finishes when the bloc is done loading (i.e. isLoading turns false).

If the state is already not loading, the future completes instantly.

Implementation

FutureOr<void> untilDoneLoading(BaseResourceBloc bloc) =>
    untilState(bloc, (state) => !state.isLoading);