fetchSectionPost method

Future fetchSectionPost()

Fetch post from server

Implementation

Future fetchSectionPost() async {
  if (isRefreshing) {
    return;
  }
  isLoadingMore.add(true);
  isRefreshing = true;
  final response =
      await client.getSectionPaginatedPosts(sectionId: sectionId, type: type);
  response.fold(
    (error) {
      controller.addError(id, error);
    },
    (list) {
      controller.update(id, list);
    },
  );
  isRefreshing = false;
  isLoadingMore.add(false);
}