Skip to content

[go_router] In TabBarView with StatefulShellBranch, content remains Blank when swiping to switch between tabs #150837

@riscait

Description

@riscait

What package does this bug report belong to?

go_router

What target platforms are you seeing this bug on?

Android, iOS

Have you already upgraded your packages?

Yes

Dependency versions

pubspec.lock
 go_router: ^14.2.0

Steps to reproduce

  1. Clone flutter/packages and run custom_stateful_shell_route for example.
  2. Swipe the TabBarView to switch between tabs.

example file:
https://github.com/flutter/packages/blob/main/packages/go_router/example/lib/others/custom_stateful_shell_route.dart

Expected results

Screen B2 of Tab 2 to be displayed even if the Tab is switched by swiping.

Actual results

Swiping does not display the contents of the TabBarView, but a blank space.

Code sample

Code sample

It can be reproduced with the example code in flutter/packages.
https://github.com/flutter/packages/blob/main/packages/go_router/example/lib/others/custom_stateful_shell_route.dart

Screenshots or Videos

Screenshots / Video demonstration
screen-20240623-115257.1.mp4

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.22.0, on macOS 14.5 23F79 darwin-arm64, locale en-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.90.2)
[✓] Connected device (6 available)
    ! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with
      the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listfound in release: 3.22Found to occur in 3.22found in release: 3.23Found to occur in 3.23has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: go_routerThe go_router packagepackageflutter/packages repository. See also p: labels.team-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