-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[go_router] Fixed TabView swiping in custom stateful shell route example #7583
[go_router] Fixed TabView swiping in custom stateful shell route example #7583
Conversation
…iping in TabView. Also added code to demonstrate use of PageView instead of TabView.
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, Can you add a test to make sure the fix is not reverted in the future?
… swipe of TabView (updating tab index of TabController) correctly navigates to the appropriate destination.
…ertinoTabScaffold. Small rename.
I see some confusion in issues around go_router related to using CupertinoTabScaffold, so I thought I'd include that as well in the sample, since it's somewhat related. Perhaps it can contributed to remove some confusion. Let me know what you think. |
Pushed an additional update with some cleanup & clarifications |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
auto label is removed for flutter/packages/7583, due to This PR has not met approval requirements for merging. The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.
|
@chunhtai, which Discord channel do I need to be in (don't see any flutter-hackers), or might it just be that I haven't been logged in for a while? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi @tolo! Thank you for contributing! FYI: |
Ah, my bad, thanks for the clarification @Hangyujin 😄 |
flutter/packages@4926c0f...7da2374 2024-09-25 chingjun@google.com Update test to not depend on `Color.toString()` (flutter/packages#7701) 2024-09-25 devoncarew@google.com [flutter_lints] remove prefer_const_constructors, prefer_const_declarations, prefer_const_literals_to_create_immutables (flutter/packages#7688) 2024-09-24 tobias@leafnode.se [go_router] Fixed TabView swiping in custom stateful shell route example (flutter/packages#7583) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@4926c0f...7da2374 2024-09-25 chingjun@google.com Update test to not depend on `Color.toString()` (flutter/packages#7701) 2024-09-25 devoncarew@google.com [flutter_lints] remove prefer_const_constructors, prefer_const_declarations, prefer_const_literals_to_create_immutables (flutter/packages#7688) 2024-09-24 tobias@leafnode.se [go_router] Fixed TabView swiping in custom stateful shell route example (flutter/packages#7583) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@4926c0f...7da2374 2024-09-25 chingjun@google.com Update test to not depend on `Color.toString()` (flutter/packages#7701) 2024-09-25 devoncarew@google.com [flutter_lints] remove prefer_const_constructors, prefer_const_declarations, prefer_const_literals_to_create_immutables (flutter/packages#7688) 2024-09-24 tobias@leafnode.se [go_router] Fixed TabView swiping in custom stateful shell route example (flutter/packages#7583) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@4926c0f...7da2374 2024-09-25 chingjun@google.com Update test to not depend on `Color.toString()` (flutter/packages#7701) 2024-09-25 devoncarew@google.com [flutter_lints] remove prefer_const_constructors, prefer_const_declarations, prefer_const_literals_to_create_immutables (flutter/packages#7688) 2024-09-24 tobias@leafnode.se [go_router] Fixed TabView swiping in custom stateful shell route example (flutter/packages#7583) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/packages@4926c0f...7da2374 2024-09-25 chingjun@google.com Update test to not depend on `Color.toString()` (flutter/packages#7701) 2024-09-25 devoncarew@google.com [flutter_lints] remove prefer_const_constructors, prefer_const_declarations, prefer_const_literals_to_create_immutables (flutter/packages#7688) 2024-09-24 tobias@leafnode.se [go_router] Fixed TabView swiping in custom stateful shell route example (flutter/packages#7583) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Updated
custom_stateful_shell_route.dart
example to better support swiping in TabView. Also added code to demonstrate use of PageView instead of TabView. Note that to be fully effective from a usability perspective, the PR #6467 (branch preloading) need also be merged.This PR addresses:
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or this PR is exempt from CHANGELOG changes.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.