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

Add ability to work with Tabs and in other cases #18

Merged
merged 5 commits into from Oct 30, 2021

Conversation

NaikSoftware
Copy link
Contributor

@NaikSoftware NaikSoftware commented Oct 26, 2021

Improved gesture recognizer to intercept only used events.
Added ability to change canSwipe from route.

  @override
  void initState() {
    super.initState();
    _tabController = TabController(length: _tabCount, vsync: this);
    _tabController.addListener(() {
      if (mounted) {
        final canSwipe = _tabController.index == 0;
        SwipeablePageSettings.of(context).canSwipe = canSwipe;
      }
    });
  }

This PR fixes #12 and #6

I found another variant to manage canSwipe flag and it also working.
image

@NaikSoftware NaikSoftware changed the title Add ability to work with Tabs and other cases Add ability to work with Tabs and in other cases Oct 26, 2021
@JonasWanke JonasWanke merged commit cbb8aeb into JonasWanke:main Oct 30, 2021
@JonasWanke
Copy link
Owner

This is now published as part of v0.2.4. Thanks for contributing!

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

Successfully merging this pull request may close these issues.

Tab Bar is not working with swipeable_page_route
2 participants