Repository: flutter
Issue: Weird transition animation when swipe back on Android with CupertinoPageTransitionsBuilder
Labels: e: device-specific,platform-android,framework,f: material design,f: cupertino,f: routes,has reproducible steps,P2,team-design,triaged-design,found in release: 3.22,found in release: 3.23

### Steps to reproduce

1. Go to your theme data
2. Use the CupertinoPageTransitionsBuilder for the target platform android in your PageTransitionsTheme

### Expected results

When swiping back a page on an Android device:

- Smooth Transition: No lags or stutters; UI elements slide smoothly
- Proper Animation Speed: Appropriate speed, allowing user control
- Compatibility: Consistent behavior across Android versions and devices

### Actual results

When swiping back a page on an Android device:

- Stuttering: The transition between pages is not smooth and exhibits noticeable stuttering

### Code sample

<details open><summary>Code sample</summary>

```dart
pageTransitionsTheme: const PageTransitionsTheme(
  builders: {
    TargetPlatform.android: CupertinoPageTransitionsBuilder(),
  },
),
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

https://github.com/flutter/flutter/assets/26725471/3b30a791-854a-44e3-aadc-ed3c805d9933



</details>


### Logs

<details open><summary>Logs</summary>

```console
[+7112 ms] I/flutter (13987): INFO: 2024-06-04 17:17:02.940716: getting location for name: "event_details", pathParameters: {eventId: fc86994a-cb01-4438-9d7f-a68a00ec8207}
[   +2 ms] I/flutter (13987): INFO: 2024-06-04 17:17:02.944073: pushing /event_details/fc86994a-cb01-4438-9d7f-a68a00ec8207
[GoRouter] getting location for name: "event_details", pathParameters: {eventId: fc86994a-cb01-4438-9d7f-a68a00ec8207}
[GoRouter] pushing /event_details/fc86994a-cb01-4438-9d7f-a68a00ec8207
[  +13 ms] I/flutter (13987): WARNING: 2024-06-04 17:17:02.958990: An extra with complex data type _Map<String, EventModel> is provided without a codec. Consider provide a codec to GoRouter to prevent extra being dropped during serialization.
[        ] I/flutter (13987): WARNING: 2024-06-04 17:17:02.959922: An extra with complex data type _Map<String, EventModel> is provided without a codec. Consider provide a codec to GoRouter to prevent extra being dropped during serialization.
[GoRouter] An extra with complex data type _Map<String, EventModel> is provided without a codec. Consider provide a codec to GoRouter to prevent extra being dropped during serialization.
[GoRouter] An extra with complex data type _Map<String, EventModel> is provided without a codec. Consider provide a codec to GoRouter to prevent extra being dropped during serialization.
[log] --> GET https://xxx 
[  +87 ms] W/WindowOnBackDispatcher(13987): OnBackInvokedCallback is not enabled for the application.
[        ] W/WindowOnBackDispatcher(13987): Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
[log] <-- GET https://xxx - 200 - (172) ms
```
</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.22.0, on macOS 14.4 23E214 darwin-arm64, locale en-DE)
    • Flutter version 3.22.0 on channel stable at /Users/rahmitufanoglu/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5dcb86f68f (4 weeks ago), 2024-05-09 07:39:20 -0500
    • Engine revision f6344b75dc
    • Dart version 3.4.0
    • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/rahmitufanoglu/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/rahmitufanoglu/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.3)
    • Android Studio at /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 17.0.10+0-17.0.10b1087.21-11572160)

[✓] IntelliJ IDEA Community Edition (version 2024.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 79.1.3
    • Dart plugin version 241.15845

[✓] VS Code (version 1.89.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.90.0

[✓] Connected device (5 available)
    • Pixel 6 (mobile)                • 19241FDF6007WF                       • android-arm64  • Android 14 (API 34)
    • iPhone Xs (mobile)              • D8138801-22EA-452B-BF7D-35259E0AF1D9 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
    • macOS (desktop)                 • macos                                • darwin-arm64   • macOS 14.4 23E214 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad                • darwin         • macOS 14.4 23E214 darwin-arm64
    • Chrome (web)                    • chrome                               • web-javascript • Google Chrome 125.0.6422.114

[✓] Network resources
    • All expected network resources are available.

• No issues found!
```

</details>