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

[Bug]: No page transition animation when using go_router and changing tabs #183

Open
danut007ro opened this issue Oct 15, 2024 · 3 comments

Comments

@danut007ro
Copy link

Version

5.3.1

Flutter Doctor Output

[✓] Flutter (Channel stable, 3.24.3, on macOS 14.6.1 23G93 darwin-arm64, locale en-RO)
    • Flutter version 3.24.3 on channel stable at /Users/danut007ro/Dev/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2663184aa7 (5 weeks ago), 2024-09-11 16:27:48 -0500
    • Engine revision 36335019a8
    • Dart version 3.5.3
    • DevTools version 2.37.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/danut007ro/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Users/danut007ro/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16A242d
    • CocoaPods version 1.15.2

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

[✓] Android Studio (version 2024.2)
    • Android Studio at /Users/danut007ro/Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)

[✓] VS Code (version 1.91.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (4 available)
    • sdk gphone64 arm64 (mobile)     • emulator-5554         • android-arm64  • Android 13 (API 33) (emulator)
    • macOS (desktop)                 • macos                 • darwin-arm64   • macOS 14.6.1 23G93 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin         • macOS 14.6.1 23G93 darwin-arm64
    • Chrome (web)                    • chrome                • web-javascript • Google Chrome 129.0.6668.91

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

• No issues found!

What platforms are you seeing the problem on?

Android

What happened?

When using go_router and switching tabs I see no page transition animation. Is this expected?

Steps to reproduce

  1. Switch tab
  2. Se no page transition animation

Code to reproduce the problem

I'm using https://github.com/jb3rndt/PersistentBottomNavBarV2/blob/master/example/lib/go_router_example.dart

Relevant log output

No response

Screenshots

No response

@jb3rndt
Copy link
Owner

jb3rndt commented Oct 20, 2024

Hi, I have not tried it out but I think in the StatefulShellRoute.indexedStack, you would need to adjust the GoRoute of each of your

StatefulShellBranch(
  routes: <RouteBase>[
    GoRoute(
      path: "settings",
      builder: (context, state) => const MainScreen(
        useRouter: true,
      ),
      routes: [subRoutes],
    ),
  ],
),

according to this: https://pub.dev/documentation/go_router/latest/topics/Transition%20animations-topic.html

@nawajar
Copy link

nawajar commented Dec 11, 2024

@jb3rndt Hi, I face same issue with StatefulShellRoute.indexedStack even custom animation with pageBuilder

@jb3rndt
Copy link
Owner

jb3rndt commented Dec 29, 2024

Can you post the code you are using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants