Repository: flutter
Issue: In Android 9 and earlier versions, the top of the WebView appears blank, and the top content is covered。
Labels: platform-android,p: webview,package,e: OS-version specific,P2,team-android,triaged-android

We use AndroidView to map Android WebView to show some HTML.
When setting mainAxisSize: MainAxisSize.min, the WebView displays abnormally, but the display is normal after sliding. When setting mainAxisSize: MainAxisSize.max the WebView displays fine. Their comparison video is as follows

https://user-images.githubusercontent.com/6021298/209784158-32c3d9eb-caec-45ce-8fe7-3e84cfd753fa.mp4

https://user-images.githubusercontent.com/6021298/209784862-c3ec13ad-df26-46ac-b557-2d389bc73b9f.mp4

This phenomenon only occurs in Android 9 and earlier versions, Android 10 & Android 11 do not have this problem.

This Demo can reproduce the problem on Android 9 and Android 5 phones.

[captcha_plugin_demo.zip](https://github.com/flutter/flutter/files/10313294/captcha_plugin_demo.zip)


## Steps to Reproduce
<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
You can use captcha_plugin_demo to reproduce the problem, captcha_plugin_demo contains all the source code.
```

</details>

<details>
  <summary>Logs</summary>

<!--
      Run your application with `flutter run --verbose` and attach all the
      log output below between the lines with the backticks. If there is an
      exception, please see if the error message includes enough information
      to explain how to solve the issue. If there is a crash, please include
      the entirety of the crash log including the backtrace.
-->

```

```

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

```
Analyzing captcha_plugin_demo...                                        

   info • Unused import: 'dart:async' • packages/sm_captcha_flutter/example/lib/main.dart:2:8 • unused_import
   info • Unused import: 'dart:io' • packages/sm_captcha_flutter/example/lib/main.dart:3:8 • unused_import
   info • Unused import: 'package:flutter/services.dart' • packages/sm_captcha_flutter/example/lib/main.dart:5:8 • unused_import
   info • Unused import: 'package:sm_captcha_flutter/sm_captcha_flutter.dart' • packages/sm_captcha_flutter/example/lib/main.dart:6:8 • unused_import
  error • Target of URI doesn't exist: 'package:sm_captcha_flutter_example/main.dart' • packages/sm_captcha_flutter/example/test/widget_test.dart:11:8 • uri_does_not_exist
  error • The function 'MyApp' isn't defined • packages/sm_captcha_flutter/example/test/widget_test.dart:16:29 • undefined_function
   info • Unused import: 'dart:async' • packages/sm_captcha_flutter/lib/sm_captcha_flutter.dart:2:8 • unused_import
   info • Unused import: 'package:flutter/services.dart' • packages/sm_captcha_flutter/lib/sm_captcha_flutter.dart:4:8 • unused_import
   info • Unused import: 'dart:ffi' • packages/sm_captcha_flutter/lib/sm_captcha_view.dart:2:8 • unused_import
   info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: SmCaptchaWebview.creationParams,
          SmCaptchaWebview.callback, SmCaptchaWebview.viewState • packages/sm_captcha_flutter/lib/sm_captcha_view.dart:9:7 • must_be_immutable
   info • Prefer using /// for doc comments • packages/sm_captcha_flutter/lib/sm_captcha_view.dart:35:3 • slash_for_doc_comments
   info • Don't type annotate initializing formals • packages/sm_captcha_flutter/lib/sm_captcha_view.dart:42:20 • type_init_formals
   info • Don't type annotate initializing formals • packages/sm_captcha_flutter/lib/sm_captcha_view.dart:42:61 • type_init_formals
   info • Use `;` instead of `{}` for empty constructor bodies • packages/sm_captcha_flutter/lib/sm_captcha_view.dart:42:93 • empty_constructor_bodies
   info • Don't type annotate initializing formals • packages/sm_captcha_flutter/lib/sm_captcha_view.dart:79:43 • type_init_formals
   info • Use `;` instead of `{}` for empty constructor bodies • packages/sm_captcha_flutter/lib/sm_captcha_view.dart:79:76 • empty_constructor_bodies
   info • Name types using UpperCamelCase • packages/sm_captcha_flutter/lib/sm_captcha_view.dart:215:9 • camel_case_types
   info • Name types using UpperCamelCase • packages/sm_captcha_flutter/lib/sm_captcha_view.dart:216:9 • camel_case_types
   info • Name types using UpperCamelCase • packages/sm_captcha_flutter/lib/sm_captcha_view.dart:217:9 • camel_case_types
   info • Name types using UpperCamelCase • packages/sm_captcha_flutter/lib/sm_captcha_view.dart:218:9 • camel_case_types
   info • Name types using UpperCamelCase • packages/sm_captcha_flutter/lib/sm_captcha_view.dart:219:9 • camel_case_types
   info • Name types using UpperCamelCase • packages/sm_captcha_flutter/lib/sm_captcha_view.dart:221:7 • camel_case_types
   info • Unused import: 'package:sm_captcha_flutter/sm_captcha_flutter.dart' • packages/sm_captcha_flutter/test/sm_captcha_flutter_test.dart:3:8 • unused_import

23 issues found. (ran in 2.3s)
```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[✓] Flutter (Channel stable, 3.3.10, on macOS 12.4 21F79 darwin-x64, locale zh-Hans-CN)
    • Flutter version 3.3.10 on channel stable at /Users/lgd/Applications/flutter3.0.5
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 135454af32 (13 days ago), 2022-12-15 07:36:55 -0800
    • Engine revision 3316dd8728
    • Dart version 2.18.6
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/lgd/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • ANDROID_HOME = /Users/lgd/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/lgd/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    • 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.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • 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.13+0-b1751.21-8125866)

[✓] IntelliJ IDEA Ultimate Edition (version 2021.3)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • 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

[✓] IntelliJ IDEA Community Edition (version 2022.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • 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

[✓] VS Code (version 1.74.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.56.0

[✓] Proxy Configuration
    • HTTP_PROXY is set
    • NO_PROXY is localhost,127.0.0.1,::1
    • NO_PROXY contains localhost
    • NO_PROXY contains 127.0.0.1
    • NO_PROXY contains ::1

[✓] Connected device (3 available)
    • H60 L01 (mobile) • 7N2SSE155G068296 • android-arm    • Android 6.0 (API 23)
    • macOS (desktop)  • macos            • darwin-x64     • macOS 12.4 21F79 darwin-x64
    • Chrome (web)     • chrome           • web-javascript • Google Chrome 108.0.5359.124

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
```

</details>


<!--
      Consider also attaching screenshots and/or videos to better
      illustrate the issue.

      You can upload them directly on GitHub.
      Beware that video file size is limited to 10MB.
-->