Repository: flutter
Issue: AnimatedCrossFade size transition does not respect reverseDuration
Labels: framework,a: animation,has reproducible steps,P2,found in release: 3.10,found in release: 3.11,team-framework,triaged-framework

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

1. Create an `AnimatedCrossFade` with different `duration` and `reverseDuration` attributes, and children with different dimensions
2. Switch its `crossFadeState` from `CrossFadeState.showSecond` to `CrossFadeState.showFirst`

### Expected results

The size transition should be as long as the opacity transition (i.e. it should be the same as `reverseDuration`, since this is a transition from the second state to the first).

### Actual results

The opacity transition correctly follows `reverseDuration`, but the size transition always follows `duration` instead.

### Code sample

[DartPad demo](https://dartpad.dev/?id=7fb438fe7f83904bca25a97941250126)

Press "Animate forward", and then "Animate backwards". Notice that the fade transition respects `reverseDuration` and occurs slowly over 2 seconds, but the black border always changes size very quickly, because it always follows `duration`.

### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

https://github.com/flutter/flutter/assets/6412/5b77cfd8-61ae-408d-9006-cdb2eab4343e

A screen capture from the provided demo. Notice that when going forward the size and content transitions have the same duration, but when going backwards the content transition is (correctly) slow, while the size transition is as fast as it was when going forward.

</details>

### Logs

_No response_

### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.10.1, on macOS 13.4 22F66 darwin-arm64, locale en-BR)
    • Flutter version 3.10.1 on channel stable at /Users/daniel/Library/Flutter/fvm/versions/3.10.1
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d3d8effc68 (12 days ago), 2023-05-16 17:59:05 -0700
    • Engine revision b4fb11214d
    • Dart version 3.0.1
    • DevTools version 2.23.1

[!] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /Users/daniel/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.2)
    • Android Studio at /Users/daniel/Library/Application
      Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.10121639/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.6+0-17.0.6b802.4-9586694)

[✓] Android Studio (version 2022.2)
    • Android Studio at /Users/daniel/Library/Application
      Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.9971841/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.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.78.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.64.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.4 22F66 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 112.0.5615.137

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.
```

</details>