fetchDataOnce method

dynamic fetchDataOnce(
  1. String url
)

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',
    ));
  }
}