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

Navigator pop is delayed #27777

Closed
pdefuns opened this issue Feb 11, 2019 · 12 comments
Closed

Navigator pop is delayed #27777

pdefuns opened this issue Feb 11, 2019 · 12 comments
Labels
f: routes Navigator, Router, and related APIs. framework flutter/packages/flutter repository. See also f: labels.

Comments

@pdefuns
Copy link

pdefuns commented Feb 11, 2019

Always when I call Navigator.pop(context); it takes some time that the current screen is popped.
I guess this is not the default behaviour?

@zoechi
Copy link
Contributor

zoechi commented Feb 11, 2019

What is "some time" appx? 100ms 1sec 5sec, ...?

Please add the output of flutter doctor -v.

To investigate we would need a minimal runnable reproduction
as a single file so that we can just copy your code into lib/main.dart of a new project and run to reproduce.

@zoechi zoechi added waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds framework flutter/packages/flutter repository. See also f: labels. f: routes Navigator, Router, and related APIs. labels Feb 11, 2019
@zoechi
Copy link
Contributor

zoechi commented Feb 11, 2019

Perhaps an animation that does not do anything visible or similar?

@pdefuns
Copy link
Author

pdefuns commented Feb 11, 2019

Sorry, delay means it's not immediately. When I print something on the close action, it's printed immediately. And if I push another route, it's also immediately - not when I pop a screen.

I'll export the minimal parts as soon as I find some time.

[✓] Flutter (Channel beta, v1.0.0, on Mac OS X 10.14.3 18D109, locale de-CH)
    • Flutter version 1.0.0 at /Users/xx/Development/Tools/flutter
    • Framework revision 5391447fae (2 months ago), 2018-11-29 19:41:26 -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /Users/xx/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/xx/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 1.9.4
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 32.0.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] VS Code (version 1.31.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.22.3

[✓] Connected device (1 available)
    • iOS • 00008020-000A615C11E2002E • ios • iOS 12.1.3

• No issues found!

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Feb 11, 2019
@zoechi
Copy link
Contributor

zoechi commented Feb 11, 2019

not immediately

Still not clear what time range that would fit.

Can you post a minimal reproduction?

@bhprinn
Copy link

bhprinn commented Jul 4, 2019

Hey did you fix it? i got same problem, but i solved it. here
go to MaterialPageRoute or paste this code inside on onPressed() { // here } or onTap() { // here } Route route = MaterialPageRoute(builder: (context) => Sample()); and press hold ctrl and click the MaterialPageRoute, if mac use cmd, and inside of it search this = transitionDuration = change the milliseconds to 0 and save. restart your project and its done. hope its work to you. reply if its work. thanks

@huuang
Copy link

huuang commented Jul 23, 2019

Perhaps an animation that does not do anything visible or similar?

This must be the reason.
It can be solved by overriding method transitionDuration of CupertinoPageRoute or MaterialPageRoute with
Duration get transitionDuration => const Duration(milliseconds: 0);

@besserwisser
Copy link

Changing the transitionDuration to 0 is not a solution! You deactivated the transition and this looks not good at all.

By the way, it only ever happened on iOS in my case and in Debug and is not reliably reproducible. On Android it never happened.

@TahaTesser
Copy link
Member

Hi @YAPPDEF
Please check this possible solution
If you're still experiencing this issue, please create a new issue and provide necessary details
Thank you

@urusai88
Copy link

urusai88 commented Aug 5, 2020

Perhaps an animation that does not do anything visible or similar?

This must be the reason.
It can be solved by overriding method transitionDuration of CupertinoPageRoute or MaterialPageRoute with
Duration get transitionDuration => const Duration(milliseconds: 0);

Thank you bro!

@brianschardt
Copy link

I am seeing this too. Settings transitionDurration to 0 seconds solves this issue but as @besserwisser said this is not a true solution.

@TahaTesser
Copy link
Member

TahaTesser commented Oct 1, 2020

Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v.
All system setups can be slightly different, so it's always better to open new issues and reference related issues.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
f: routes Navigator, Router, and related APIs. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

No branches or pull requests

8 participants