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
Page does not change despite state changing #48
Comments
downgrade does not help. |
I've found the issue. If I use MaterialPage all is ok. But pages do not want to switch if I use CustomMaterial page without animation or delay. class CustomMaterialPage<T> extends Page<T> {
const CustomMaterialPage({required this.child, LocalKey? key})
: super(key: key);
final Widget child;
static const _transitionDuration = Duration(milliseconds: 50);
@override
Route<T> createRoute(BuildContext context) => PageRouteBuilder(
settings: this,
transitionDuration: _transitionDuration,
reverseTransitionDuration: _transitionDuration,
pageBuilder: (
context,
animation,
secondaryAnimation,
) =>
FadeTransition(opacity: animation, child: child),
);
} @felangel Any Ideas? |
Hi @dan-leech 👋 Can you please share a link to a minimal reproduction sample? Thanks! 🙏 |
@felangel Just try to use I solved this with rewriting |
@felangel I have exactly the same issue as @dan-leech . I have created the a repo for you that shows the error I have encountered: https://github.com/remonh87/flowbuilder_issue_repo . Also I have 2 scenarios that do work (one is exactly what Dan mentioned if you change to material page no issues). I used the standard Flutter example for pageroutebuilder. Let me know if you need more. |
I looked into @remonh87 repo and it turns out that the problem is not a flowbuilder issue but a Navigation2.0 issue. I replaced Flowbuilder with Navigation and reproduced the same problem (where the MaterialPage works but not a CustomPage). If you want to use a navigation bar, I would suggest just having a list of pages and selecting between them using setState when a bottom nav bar item is tapped. You can then add a flowbuilder widget within each page to control navigation. |
@liPatrick sorry for my super late reaction (for some reason missed your reply). The suggestion you proposed works great and is actually quite a nice one. |
@remonh87 that's great to hear, thanks for sharing! Closing this for now since it doesn't appear there is any further action required. Let me know if you have any additional comments/questions and I'm happy to continue the conversation 👍 |
I had the same problem (flow no longer updating) and came across this issue. Thanks for sharing your minimal example @remonh87. So here is the deal: I tell you how to fix your To fix your static CustomPage<void> page() => const CustomPage<void>(
name: 'page1',
child: _Page1(),
key: ValueKey('page1'), // <- This line is added
); That's it. In my app I was cleaning up some code and among many other changes I removed a key from a My first thought was ok, there are only |
I had the same problem too - thanks for the fix, @ToniTornado. I would also be interested to know why this works as it does... |
Describe the bug
The last page is frozen in page stack despite there is a new page should be.
I use _onGeneratePages this way:
Flutter version is 2.2.2
I'm sure(I debugged and checked all things) that after state update only NameForm in the stack. But SummaryPage is still on the screen.
Might it be Navigator issue...
I'm trying downgrade now.
Might someone have the same issue?
The text was updated successfully, but these errors were encountered: