Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overlapping transform #26

Open
vjyanand opened this issue May 19, 2020 · 0 comments
Open

overlapping transform #26

vjyanand opened this issue May 19, 2020 · 0 comments

Comments

@vjyanand
Copy link

vjyanand commented May 19, 2020

How do I avoid overlapping when swipe with transform as below?

class DeckTransformer extends PageTransformer {
  @override
  Widget transform(Widget item, TransformInfo info) {
    double position = info.position;
    if (position <= 0) {
      return item;    
    } else if (position <= 1) {
      return Transform.translate(
        offset: Offset(0, -info.height * position),
        child: item,
      );
    }
    return item;
  }
}
TransformerPageView(
   scrollDirection: Axis.horizontal, 
   transformer: DeckTransformer(),

Image of the issue

Sorry for posting help request in issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant