Repository: flutter
Issue: [webview_flutter]flickering inside pageView on IOS
Labels: platform-ios,p: webview,package,has reproducible steps,P2,found in release: 3.0,found in release: 3.1,team-ios,triaged-ios

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Steps to Reproduce

<!-- Please include full steps to reproduce so that we can reproduce the problem. -->
1. Apply dark mode to simulator/device
2. Execute `flutter run` on the code sample <!-- (see "Code sample" section below) -->
3. Then change bottom navigation index.
4. Before next webView page, It will occur flickering background for a few frames.

**Record:** 

| master  3.1.0-0.0.pre.1695 | 
| -- |
| <video src="https://user-images.githubusercontent.com/46276533/179385558-2e77874c-2ec7-4c8d-8a90-f5f22eac01eb.mov" /> | 






**Expected results:** <!-- what did you want to see? -->
Change pageView without flickering


 [example repo](https://github.com/Heewookji/webview-bug)

<details>
<summary>Code sample</summary>

<!--
      Please create a minimal reproducible sample that shows the problem
      and attach it below between the lines with the backticks.

      To create it you can use `flutter create bug` command and update the `main.dart` file.

      Alternatively, you can use https://dartpad.dev/
      which is capable of creating and running small Flutter apps.

      Without this we will unlikely be able to progress on the issue, and because of that
      we regretfully will have to close it.
-->

```dart
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  late final Future _navigateToHome;
  final _navigatorKey = GlobalKey<NavigatorState>();

  NavigatorState get _navigator => _navigatorKey.currentState!;

  @override
  void initState() {
    super.initState();
    _navigateToHome = Future.delayed(
      const Duration(seconds: 2),
      () => _navigator.pushNamedAndRemoveUntil(
        MyHomePage.routeName,
        (route) => false,
      ),
    );
  }

  @override
  Widget build(BuildContext context) {
    return FutureBuilder(
      future: _navigateToHome,
      builder: (context, snapshot) {
        return MaterialApp(
          initialRoute: SplashPage.routeName,
          navigatorKey: _navigatorKey,
          onGenerateRoute: (settings) {
            switch (settings.name) {
              case SplashPage.routeName:
                return MaterialPageRoute(
                  builder: (_) => const SplashPage(),
                  settings: settings,
                );
              default:
                return MaterialPageRoute(
                  builder: (_) => const MyHomePage(),
                  settings: settings,
                );
            }
          },
        );
      },
    );
  }
}

class SplashPage extends StatelessWidget {
  static const String routeName = '/splash';
  const SplashPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const Scaffold(
      backgroundColor: Colors.redAccent,
    );
  }
}

class MyHomePage extends StatefulWidget {
  static const String routeName = '/home';
  const MyHomePage({Key? key}) : super(key: key);

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int currentIndex = 0;
  PageController pageController = PageController();

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: PageView(
        controller: pageController,
        physics: const NeverScrollableScrollPhysics(),
        children: const [
          WebView(initialUrl: 'https://flutter.dev/'),
          WebView(initialUrl: 'https://flutter.dev/'),
          WebView(initialUrl: 'https://flutter.dev/'),
        ],
      ),
      bottomNavigationBar: BottomNavigationBar(
        onTap: (index) {
          setState(() {
            currentIndex = index;
          });
          pageController.jumpToPage(index);
        },
        currentIndex: currentIndex,
        selectedItemColor: Colors.amber,
        items: const [
          BottomNavigationBarItem(
            icon: Icon(Icons.home),
            label: '1',
            backgroundColor: Colors.blueAccent,
          ),
          BottomNavigationBarItem(
            icon: Icon(Icons.send),
            label: '2',
          ),
          BottomNavigationBarItem(
            icon: Icon(Icons.notifications),
            label: '3',
          ),
        ],
      ),
    );
  }
}
```

</details>

<details>
  <summary>flutter doctor</summary>

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[✓] Flutter (Channel master, 3.1.0-0.0.pre.1695, on macOS 12.4 21F79 darwin-x64, locale ko-KR)
    • Flutter version 3.1.0-0.0.pre.1695 on channel master at /Users/heewook/dev/environment/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4f9528293f (26시간 전), 2022-07-15 17:54:05 -0700
    • Engine revision 496c11601c
    • Dart version 2.19.0 (build 2.19.0-3.0.dev)
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/heewook/Library/Android/sdk
    • Platform android-31, 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 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 13F100
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.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 1.8.0_242-release-1644-b3-6915495)

[✓] IntelliJ IDEA Ultimate Edition (version 2021.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.4746.57

[✓] VS Code (version 1.63.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.29.0

[✓] Connected device (3 available)
    • iPhone 11 (mobile) • 0246DD11-2199-48D4-929C-170DD6475DBD • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-13-0 (simulator)
    • macOS (desktop)    • macos                                • darwin-x64     • macOS 12.4 21F79 darwin-x64
    • Chrome (web)       • chrome                               • web-javascript • Google Chrome 103.0.5060.114

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

```

</details>