Skip to content

showModalBottomSheet partially disappears after pushing new route while using FadeForwardsPageTransitionsBuilder #163389

@jt274

Description

@jt274

Steps to reproduce

  1. Show a bottom sheet using showModalBottomSheet().
  2. While the sheet is open, push a new route (tested using go_router): await context.push('myRoute');
  3. As page transition begins you can see the bottom sheet disappear, but the overlay behind it remains.
  4. After popping the route back to the screen with the bottom sheet, only the tinted overlay is visible. On iOS there is no way to escape this. On Android, pressing the device back button causes the bottom sheet to momentarily appear before closing.
  5. Using the previous ZoomPageTransitionsBuilder, the navigation works as expected.

Reproduced on Android emulator API 35, SM-G981V, iPhone 11.

Expected results

The bottom sheet should not partially disappear, but remain visible while the route is pushing, and be visible when the pushed route pops.

Actual results

The bottom sheet partially disappears, leaving the overlay behind.

Code sample

https://github.com/jt274/modal_page_transition_issue

Code sample
showModalBottomSheet<void>(
    context: context,
    builder: (BuildContext context) {
      return CupertinoButton(onPressed: () async {
          await context.push('myRoute');
      },
    child: const Text('Tap Me'));
});

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.29.0, on Microsoft Windows [Version 10.0.26100.3037], locale en-US)
[√] Windows Version (11 Pro 64-bit, 24H2, 2009)
[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/to/windows-android-setup for more details.
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2019 16.10.0)
[√] Android Studio (version 2024.3)
[√] VS Code (version 1.96.4)
[√] Connected device (4 available)
[√] Network resources

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listf: material designflutter/packages/flutter/material repository.f: routesNavigator, Router, and related APIs.found in release: 3.29Found to occur in 3.29found in release: 3.30Found to occur in 3.30frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions