onEmptyLoadingReturn method
Substitutes LceLoading with empty data with state produced by block
block
transformation block
Implementation
Stream<LceState<DATA>> onEmptyLoadingReturn(LceState<DATA> Function(LceLoading<DATA> loading) block) => map((state) =>
state.whenElse(
loading: (loading) => null == loading.data ? block(loading) : loading,
onElse: (state) => state
)
);