animateToNextSlideWithLocalStorage method

void animateToNextSlideWithLocalStorage()

This function is called when the user taps the "Next" button on the last onboarding page.

Implementation

void animateToNextSlideWithLocalStorage() {
  if (controller.currentPage == 2) {
    userStorage.write('isFirstTime', false);
    if (kDebugMode) {
      print(userStorage.read('isFirstTime'));
    }
    Get.offAll(() => const WelcomeScreen());
  } else {
    controller.animateToPage(page: controller.currentPage + 1);
  }
}