added support for simultan downloads in files and talk, support for background downloads, enhanced loading in files with retry
This commit is contained in:
+14
@@ -35,10 +35,24 @@ abstract class LoadableHydratedBloc<
|
||||
lastFetch: state.lastFetch,
|
||||
reFetch: retry,
|
||||
error: state.error,
|
||||
statusText: state.statusText,
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
on<LoadingStatus<TState>>(
|
||||
(event, emit) => emit(
|
||||
LoadableState(
|
||||
isLoading: state.isLoading,
|
||||
data: innerState,
|
||||
lastFetch: state.lastFetch,
|
||||
reFetch: state.reFetch,
|
||||
error: state.error,
|
||||
statusText: event.statusText,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
on<DataGathered<TState>>(
|
||||
(event, emit) => emit(
|
||||
LoadableState(
|
||||
|
||||
+8
@@ -19,4 +19,12 @@ class Error<TState> extends LoadableHydratedBlocEvent<TState> {
|
||||
|
||||
class RefetchStarted<TState> extends LoadableHydratedBlocEvent<TState> {}
|
||||
|
||||
/// Sets the state's `statusText` — a transient progress note under the
|
||||
/// primary loading spinner (e.g. "Erneuter Versuch (2 von 3) …"). Cleared
|
||||
/// automatically by [DataGathered], [Error], [RefetchStarted] and [Reset].
|
||||
class LoadingStatus<TState> extends LoadableHydratedBlocEvent<TState> {
|
||||
final String? statusText;
|
||||
LoadingStatus(this.statusText);
|
||||
}
|
||||
|
||||
class Reset<TState> extends LoadableHydratedBlocEvent<TState> {}
|
||||
|
||||
Reference in New Issue
Block a user