previousPage method

Future previousPage()

Implementation

Future previousPage() async {
  await _controllers[pageNumber - 1].forward();
  if (mounted) {
    setState(() {
      pageNumber--;
    });
  }
  currentPageIndex.value = pageNumber;
  currentWidget.value = pages[pageNumber];
  imageData[pageNumber] = null;
}