setupNavButtons method

dynamic setupNavButtons()

Implementation

setupNavButtons() {
  int index = bookProgress.getBookProgress(bookId).currentChapterIndex ?? 0;

  setState(() {
    if (index == 0) {
      showPrevious = false;
    } else {
      showPrevious = true;
    }
    if (index == chaptersList.length - 1) {
      showNext = false;
    } else {
      showNext = true;
    }
  });
}