Skip to content

Add animation for click button skip, next, back #70

@khanhuitse05

Description

@khanhuitse05

First! Thank for your package. It saves me a lot of time.
Hope I can help you with this "Request"

--> This is my code

...
void animationToPage(int page) {
    nextPageIndex = page;
    animatedPageDragger = AnimatedPageDragger(
      slideDirection: activePageIndex > nextPageIndex
          ? SlideDirection.leftToRight
          : SlideDirection.rightToLeft,
      transitionGoal: TransitionGoal.open,
      slidePercent: slidePercent,
      slideUpdateStream: slideUpdateStream,
      vsync: this,
    );
    animatedPageDragger.run();
  }
...

  void onPressedBack() {
    animationToPage(max(0, activePageIndex - 1));
  }

  void onPressedNext() {
    animationToPage(min(widget.pages.length - 1, activePageIndex + 1));
  }

  void onPressedSkip() {
    animationToPage(widget.pages.length - 1);
  }
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions