Repository: flutter
Issue: Image is reloaded after routes change and background-foreground switch
Labels: framework,f: routes,a: images,has reproducible steps,P2,team-framework,triaged-framework,found in release: 3.24

### Steps to reproduce

When the App enters the background, the ImageCache will be cleared, and obvious flickering can be seen when the page is rolled back.
Setting gaplessPlayback = true can solve the problem, but I don't think it's the right way to do it.
The flickering is more obvious on Android devices, probably because my Apple device has a higher configuration.

I can identify apps developed with Flutter by this feature or problem. 😂

### Expected results

Image widget should not flicker.

### Actual results

Noticeable flickering as the image is being reloaded and decoded.

### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/cupertino.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 Page1(),
    );
  }
}

class Page1 extends StatelessWidget {
  const Page1({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        actions: [
          CupertinoButton(
            child: const Text('Page 2'),
            onPressed: () {
              Navigator.of(context).push(
                  CupertinoPageRoute(builder: (context) => const Page2()));
            },
          ),
        ],
      ),
      body: SizedBox.expand(
        child: Column(
          children: [
            Image.network(
              'https://c-ssl.dtstatic.com/uploads/blog/202211/03/20221103210025_eb1a3.thumb.1000_0.jpg',
              height: 200,
            ),
            const SizedBox(height: 12),
            Image.asset(
              'assets/images/1.png',
              height: 200,
            ),
          ],
        ),
      ),
    );
  }
}

class Page2 extends StatelessWidget {
  const Page2({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: const Center(
        child: Text(
          'Page 2',
          style: TextStyle(
            fontSize: 30,
            color: Colors.red,
          ),
        ),
      ),
    );
  }
}

```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

https://github.com/user-attachments/assets/13503ece-b30c-4773-a960-ee4227ec3ae8

</details>


### Flutter Doctor output

<details open>
<summary>Doctor output</summary>

```
[✓] Flutter (Channel stable, 3.22.3, on macOS 14.6 23G80 darwin-arm64, locale
    zh-Hans-CN)
    • Flutter version 3.22.3 on channel stable at /Users/haijun/fvm/3.22.3
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b0850beeb2 (4 weeks ago), 2024-07-16 21:43:41 -0700
    • Engine revision 235db911ba
    • Dart version 3.4.4
    • DevTools version 2.34.3
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/haijun/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15C500b
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2)
    • 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.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.92.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.94.0

[✓] Connected device (4 available)
    • 2109119BC (mobile)              • bcdbd14b              • android-arm64  •
      Android 13 (API 33)

[✓] Network resources
    • All expected network resources are available.

• No issues found!

```

</details>