Repository: flutter
Issue: Images rebuilding on tab change With AutomaticKeepAlive set to true
Labels: framework,a: images,has reproducible steps,P2,found in release: 2.5,found in release: 2.6,team-framework,triaged-framework

This issue was somehow mentioned in #91996. I'm facing the same problem, so I've opened a new one.

I've got an app with CupertinoTabScaffold and CupertinoTabBar. I've solved image preloading problems on scroll with addAutomaticKeepAlives and cacheExtent properties. However, when I'm navigating through tabs, my image lists are always being redrawn, because every tab change causes build() method call on tabs content, and this process is slow enough to be visible for users. Is it possible not to redraw images, which were already rendered, on build() method call? Or how can I preload images in other way? precacheImage() method is already been used in my app, however, it doesn't have any effect.

https://user-images.githubusercontent.com/9917941/142609383-02a877cd-063e-421b-ac0a-4b8d4ac2256b.mov

Here is the code of build() method:
```
@override
  Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.symmetric(horizontal: kDefaultPadding),
      child: GridView.count(
        addAutomaticKeepAlives: true,
        cacheExtent: 1000,
        padding: EdgeInsets.symmetric(vertical: 16),
        childAspectRatio: 5 / 7,
        mainAxisSpacing: 16,
        crossAxisSpacing: 16,
        crossAxisCount: getDeviceType() == DeviceType.Tablet
            ? MediaQuery.of(context).orientation == Orientation.portrait
                ? 4
                : 6
            : 2,
        children: viewModel.favoriteVerses!
            .map(
              (verse) => GestureDetector(
                  onTap: () {
                    viewModel.openSavedVersesFullScreenView(
                        viewModel.favoriteVerses!,
                        viewModel.favoriteVerses!.indexOf(verse),
                        context,
                        appSettings);
                  },
                  child: VersePreviewCard(
                    verse: verse,
                  )),
            )
            .toList(),
      ),
    );
  }
```

_VersePreviewCardState class goes with AutomaticKeepAliveClientMixin to make property addAutomaticKeepAlives work.

And here is `flutter doctor -v` output:
```
[✓] Flutter (Channel stable, 2.5.3, on macOS 11.6 20G165 darwin-x64, locale ru-RU)
    • Flutter version 2.5.3 at /Users/nikita/Downloads/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 18116933e7 (5 weeks ago), 2021-10-15 10:46:35 -0700
    • Engine revision d3ea636dc5
    • Dart version 2.14.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/nikita/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 13.0, Build version 13A233
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.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 11.0.8+10-b944.6916264)

[✓] VS Code (version 1.62.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.28.0

[✓] VS Code (version 1.57.1)
    • VS Code at /Users/nikita/Documents/Visual Studio Code.app/Contents
    • Flutter extension version 3.28.0

[✓] Connected device (5 available)
    • iPhone 8 (mobile)                   • BFAC1EC5-E3B6-421C-8A46-F21D37D219D6 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
    • iPhone 12 mini (mobile)             • F64A8D0C-6B5E-4ABD-968C-748322A66F19 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
    • iPhone 13 Pro Max (mobile)          • 55BF72E7-76A3-4D91-9DF9-5589EE232710 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
    • iPad mini (6th generation) (mobile) • 0EF47A0E-02F3-4E14-A6F0-60E5013202EF • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-15-0 (simulator)
    • Chrome (web)                        • chrome                               • web-javascript • Google Chrome 96.0.4664.55

• No issues found!
```