-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Steps to reproduce
- Jump from the home page to the detail page
- Open the dialog on the detail page.
- Click the back button that comes with the Edge Mobile browser.
Expected results
The dialog will close, and the page will remain on the detail page, with the URL being "/detail"
or
The dialog will close, and the page will return to the home page, with the URL being "/"
Actual results
The dialog will close, and the page will remain on the detail page, But the URL is /
Code sample
part1
routes: {
'/': (context) => const HomePage(),
'/detail': (context) => const DetailPage(),
},part2
onTap: () {
showDialog(
context: context,
builder:
(ctx) => AlertDialog(
title: const Text('Invalid Input'),
content: const Text('Please enter all the fields'),
actions: [
TextButton(
onPressed: () => Navigator.pop(ctx),
child: const Text('Okay'),
),
],
),
);Do not click the "OK" button. Instead, click the back button built into the Edge browser (since you cannot prevent users from doing so). Clicking the "OK" button is normal. Only by clicking the back button provided by the browser can this bug be reproduced.
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
[√] Flutter (Channel stable, 3.32.8, on Microsoft Windows [版本 10.0.19045.6093], locale zh-CN)
[√] Windows Version (10 专业版 64 位, 22H2, 2009)
[!] Android toolchain - develop for Android devices (Android SDK version 35.0.1)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[√] Chrome - develop for the web
[X] Visual Studio - develop Windows apps
X Visual Studio not installed; this is necessary to develop Windows apps.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2024.2)
[√] IntelliJ IDEA Ultimate Edition (version 2025.1)
[√] Connected device (4 available)
[√] Network resources