flutter / flutter/flutter

RouteAware didPushNext is not called when pushing two routes at once

Open
#189,050 2 comments 0 reactions 0 assignees View on GitHub
f: routes framework has reproducible steps P2 team-framework triaged-framework waiting for PR to land (fixed)
Dominant language
Dart
Stars
179k
Forks
31.1k
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

issue https://github.com/flutter/flutter/issues/55949 is closed, but the workaround is fragile and generally neither expected, nor universally applicable

please consider fixing it
____
```
navigator
..push(a)
..push(b);
```

### Expected results

`RouteAware` receives `didPushNext`

### Actual results

`RouteAware` does not `didPushNext`

### Code sample

Code sample

see github.com/flutter/flutter/issues/55949

### Screenshots or Video

_No response_

### Logs

_No response_

### Flutter Doctor output

Doctor output

```console
[✓] Flutter (Channel stable, 3.44.5, on macOS 26.4 25E246 darwin-arm64, locale en) [547ms]
• Flutter version 3.44.5 on channel stable at /Users/yauhen/fvm/versions/3.44.5
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f94f4fc76b (15 hours ago), 2026-07-06 11:19:24 -0700
• Engine revision 83675ed276
• Dart version 3.12.2
• DevTools version 2.57.0
• Pub download mirror https://pub.dev
• Feature flags: enable-web, no-enable-linux-desktop, no-enable-macos-desktop, no-enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, no-enable-swift-package-manager, omit-legacy-version-file,
enable-lldb-debugging, enable-uiscene-migration

[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0) [1,858ms]
• Android SDK at /Users/yauhen/Library/Android/sdk/
• Emulator version 36.4.9.0 (build_id 14788078) (CL:N/A)
• Platform android-36.1, build-tools 36.1.0
• ANDROID_HOME = /Users/yauhen/Library/Android/sdk/
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
• Java version OpenJDK Runtime Environment (build 21.0.10+-117844308-b1163.108)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 26.2) [1,795ms]
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 17C52
• CocoaPods version 1.16.2

[✓] Chrome - develop for the web [4ms]
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Connected device (2 available) [6.8s]
• Android SDK built for arm64 (mobile) • emulator-5554 • android-arm64 • Android 15 (API 35) (emulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 149.0.7827.201

[✓] Network resources [682ms]
• All expected network resources are available.

• No issues found!
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with two sequential navigator.push calls using the example in the report, then trace Flutter's RouteAware and navigation callback handling. Done means the existing RouteAware receives didPushNext when two routes are pushed at once, with a regression test covering the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.