Repository: flutter
Issue: Unwanted animation appears when only providing PageStorageKey for one of two ListView
Labels: framework,f: scrolling,has reproducible steps,P2,workaround available,team-framework,triaged-framework,found in release: 3.24,found in release: 3.26

### Steps to reproduce

Run the attached code sample

### Expected results

Chips appear without animation, as they do when there's no PageStorageKey specified

### Actual results

Chips appear with a strange unwanted slide animation

### 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 issue',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const HomePageView(),
    );
  }
}

class HomePageView extends StatefulWidget {
  const HomePageView({super.key});

  @override
  State<HomePageView> createState() => _HomePageViewState();
}

class _HomePageViewState extends State<HomePageView> {
  int _currentPageIndex = 0;

  late final _pages = [
    const Page1View(),
    const Page2View(),
    const Page3View(),
    const Page4View(),
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Page storage')),
      body: _buildPage(),
      bottomNavigationBar: _buildBottomNavigationBar(),
    );
  }

  Widget _buildPage() {
    return PageStorage(
      bucket: PageStorageBucket(),
      child: _pages.elementAt(_currentPageIndex),
    );
  }

  Widget _buildBottomNavigationBar() {
    return NavigationBar(
      destinations: const [
        NavigationDestination(
          icon: Icon(Icons.dashboard),
          label: 'Dashboard',
        ),
        NavigationDestination(
          icon: Icon(Icons.keyboard),
          label: 'Write',
        ),
        NavigationDestination(
          icon: Icon(Icons.format_list_numbered),
          label: 'Organize',
        ),
        NavigationDestination(
          icon: Icon(Icons.timer),
          label: 'Schedule',
        ),
      ],
      selectedIndex: _currentPageIndex,
      onDestinationSelected: (index) async {
        setState(() {
          _currentPageIndex = index;
        });
      },
    );
  }
}

class Page1View extends StatefulWidget {
  const Page1View({super.key});

  @override
  State<Page1View> createState() => _Page1ViewState();
}

class _Page1ViewState extends State<Page1View> {
  @override
  Widget build(BuildContext context) {
    return _buildList();
  }

  Widget _buildList() {
    return ListView(
      key: const PageStorageKey('page1'),
      children: List.generate(40, (index) {
        return Card(
          child: Padding(
            padding: const EdgeInsets.all(16),
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                SizedBox(
                  height: 40,
                  child: ListView(
                    scrollDirection: Axis.horizontal,
                    children: List.generate(10, (index) {
                      return Chip(
                        label: Text(
                          'Chip $index',
                          style: const TextStyle(color: Colors.green),
                        ),
                        shape: const StadiumBorder(
                          side: BorderSide(color: Colors.green),
                        ),
                      );
                    }),
                  ),
                ),
                const SizedBox(height: 10),
                ListTile(
                  title: Text('Item $index'),
                ),
              ],
            ),
          ),
        );
      }),
    );
  }
}

class Page2View extends StatefulWidget {
  const Page2View({super.key});

  @override
  State<Page2View> createState() => _Page2ViewState();
}

class _Page2ViewState extends State<Page2View> {
  @override
  Widget build(BuildContext context) {
    return _buildList();
  }

  Widget _buildList() {
    return ListView(
      children: List.generate(40, (index) {
        return Card(
          child: Padding(
            padding: const EdgeInsets.all(16),
            child: Text('Item $index'),
          ),
        );
      }),
    );
  }
}

class Page3View extends StatefulWidget {
  const Page3View({super.key});

  @override
  State<Page3View> createState() => _Page3ViewState();
}

class _Page3ViewState extends State<Page3View> {
  @override
  Widget build(BuildContext context) {
    return _buildList();
  }

  Widget _buildList() {
    return ListView(
      children: List.generate(40, (index) {
        return Card(
          child: Padding(
            padding: const EdgeInsets.all(16),
            child: Text('Item $index'),
          ),
        );
      }),
    );
  }
}

class Page4View extends StatefulWidget {
  const Page4View({super.key});

  @override
  State<Page4View> createState() => _Page4ViewState();
}

class _Page4ViewState extends State<Page4View> {
  @override
  Widget build(BuildContext context) {
    return _buildList();
  }

  Widget _buildList() {
    return ListView(
      children: List.generate(40, (index) {
        return Card(
          child: Padding(
            padding: const EdgeInsets.all(16),
            child: Text('Item $index'),
          ),
        );
      }),
    );
  }
}

```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

https://github.com/user-attachments/assets/9b7e91fb-e704-42b9-8365-ea923d6925ad

</details>


### Logs

_No response_

### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[√] Flutter (Channel stable, 3.24.3, on Microsoft Windows [Versione 10.0.19045.4894], locale it-IT)
    • Flutter version 3.24.3 on channel stable at C:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2663184aa7 (2 weeks ago), 2024-09-11 16:27:48 -0500
    • Engine revision 36335019a8
    • Dart version 3.5.3
    • DevTools version 2.37.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\Alessandro\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.11+0--11852314)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[!] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.11.4)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.11.35312.102
    X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++" workload, and include these components:
        MSVC v142 - VS 2019 C++ x64/x86 build tools
         - If there are multiple build tool versions available, install the latest
        C++ CMake tools for Windows
        Windows 10 SDK

[√] Android Studio (version 2024.1)
    • Android Studio at C:\Program Files\Android\Android Studio
    • 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
    • android-studio-dir = C:\Program Files\Android\Android Studio
    • Java version OpenJDK Runtime Environment (build 17.0.11+0--11852314)

[√] VS Code (version 1.71.2)
    • VS Code at C:\Users\Alessandro\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.48.0

[√] Connected device (4 available)
    • Pixel Fold (mobile) • 35181FDHS00206 • android-arm64  • Android 14 (API 34)
    • Windows (desktop)   • windows        • windows-x64    • Microsoft Windows [Versione 10.0.19045.4894]
    • Chrome (web)        • chrome         • web-javascript • Google Chrome 129.0.6668.70
    • Edge (web)          • edge           • web-javascript • Microsoft Edge 128.0.2739.42

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.
```

</details>