nextPage method
Implementation
Future nextPage() async {
await _controllers[pageNumber].reverse();
if (mounted) {
setState(() {
pageNumber++;
});
}
if (pageNumber < pages.length) {
currentPageIndex.value = pageNumber;
currentWidget.value = pages[pageNumber];
}
if (_isLastPage) {
currentPageIndex.value = pageNumber;
currentWidget.value = pages[pageNumber];
return;
}
}