Repository: flutter
Issue: CarouselView cards animation changes after widget gets recreated
Labels: framework,f: material design,has reproducible steps,P2,team-design,triaged-design,found in release: 3.27,found in release: 3.28

### Steps to reproduce

1. Run provided code.
2. Swipe cards - they are animated correctly.
3. Click swipe icon twice what disposes and creates CarouselView.
4. Swipe cards - they are resized instead of moved.

### Expected results

I expect that cards will be not resized while swiping.   
https://github.com/user-attachments/assets/de23253b-7499-4e90-b5e6-57053ea58007



### Actual results

Cards are resized while swiping.   
https://github.com/user-attachments/assets/975d719b-895e-4666-987d-e2fb4822ac5e



### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
          colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
          useMaterial3: true,
        ),
        home: const Scaffold(
            body: SafeArea(
          child: PageSwiper(),
        )));
  }
}

class PageSwiper extends StatefulWidget {
  const PageSwiper({super.key});

  @override
  State<PageSwiper> createState() => _PageSwiperState();
}

class _PageSwiperState extends State<PageSwiper> {
  int page = 0;
  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        IconButton(onPressed: () => setState(() => page = page == 0 ? 1 : 0), icon: const Icon(Icons.swipe)),
        page == 0
            ? SizedBox(
                height: 150,
                child: CarouselView(
                  scrollDirection: Axis.horizontal,
                  itemSnapping: true,
                  itemExtent: double.infinity,
                  children: [1, 2].map((e) => HomepageBoostedOddsCarouselCard(index: e)).toList(),
                ),
              )
            : Container(),
      ],
    );
  }
}

class HomepageBoostedOddsCarouselCard extends StatelessWidget {
  const HomepageBoostedOddsCarouselCard({
    super.key,
    required this.index,
  });

  final int index;

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.amber,
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        mainAxisSize: MainAxisSize.min,
        children: [
          const Text('New design'),
          const SizedBox(height: 10),
          Container(color: Colors.white, height: 30, width: 200),
          const SizedBox(height: 10),
        ],
      ),
    );
  }
}

```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[[Upload media here]](https://github.com/user-attachments/assets/b32b7986-cc74-4706-a915-23bd482201c6)

</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.24.1, on macOS 15.2 24C101 darwin-arm64, locale en-PL)
    • Flutter version 3.24.1 on channel stable at /Users/kris/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5874a72aa4 (5 months ago), 2024-08-20 16:46:00 -0500
    • Engine revision c9b9d5780d
    • Dart version 3.5.1
    • DevTools version 2.37.2

[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/kris/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/to/macos-android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16B40
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1)
    • 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.11+0-17.0.11b1207.24-11852314)

[✓] VS Code (version 1.96.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.102.0
```

</details>