AbstractListBloc<S extends AbstractListState> constructor
AbstractListBloc<S extends AbstractListState> (
- S initialState
Implementation
AbstractListBloc(S initialState) : super(initialState) {
on(
(AbstractListEvent event, Emitter<S> emit) async {
if (event is AbstractListLoadEvent) {
await load(event, emit);
} else if (event is AbstractListRefreshEvent) {
await refresh(event, emit);
} else if (event is AbstractListLoadMoreEvent) {
await loadMore(event, emit);
}
},
);
}