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