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

Hero not working #48

Open
peturaron opened this issue Mar 18, 2024 · 1 comment
Open

Hero not working #48

peturaron opened this issue Mar 18, 2024 · 1 comment

Comments

@peturaron
Copy link

peturaron commented Mar 18, 2024

Flutter 3.7.0
one_context: ^4.0.0

Using just a basic Hero doesn't work when navigating to sites i.e.
Navigator.pushNamed(context, CheckoutScreen.routeName);
or
OneContext().pushNamed(CheckoutScreen.routeName);

If I remove this from my material app, then Hero animation works again suddenly, do you know a solution ?
And confirms the Hero bug is due to OneContext

MaterialApp(
navigatorKey: OneContext().key,
builder: OneContext().builder, --> remove this

@emanuel-braz
Copy link
Owner

Please try this: navigatorObservers: [OneContext().heroController],

MaterialApp(
    navigatorObservers: [OneContext().heroController],
    navigatorKey: OneContext().key,
    builder: OneContext().builder,

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

2 participants