fetchDataJoin method
Implementation
fetchDataJoin(String url, List<InfiniteScrollPODO> oldData) async {
try {
List<InfiniteScrollPODO> data = await dataRepo.fetchData(url, nextPage);
final newData = [...oldData, ...data];
this.emit(FetchDataState.loaded(newData));
incrementPage();
} catch (e) {
this.emit(FetchDataState.error(
generic: 'An error occurred, please try again',
));
}
}