Repository: flutter
Issue: [iOS] Keyboard partially overlaps TextField after native dialog closes
Labels: a: text input,c: regression,platform-ios,engine,has reproducible steps,P2,team-ios,triaged-ios,found in release: 3.13,found in release: 3.14,fyi-text-input

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

1- Create screen with bottomSheet and add a TextField in the screen
2- Open keyboard by clicking on the text field
3- Cause native dialog to open for example by opening the image picker dialog
4- close the dialog by clicking close button or add in image picker dialog

### Expected results

after the native dialog closes the keyboard should show up under the bottomSheet

### Actual results

the keyboard overlaps part of the bottomSheet

### Code sample

<details><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        theme: ThemeData(
          colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
          useMaterial3: true,
        ),
        home: const HomeScreen());
  }
}

class HomeScreen extends StatefulWidget {
  const HomeScreen({Key? key}) : super(key: key);

  @override
  State<HomeScreen> createState() => _HomeScreenState();
}

class _HomeScreenState extends State<HomeScreen> {
  final ImagePicker picker = ImagePicker();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: TextField(),
      ),
      bottomSheet: Padding(
        padding: const EdgeInsets.all(24),
        child: TextField(
          decoration: InputDecoration(
              prefixIcon: IconButton(
            icon: const Icon(Icons.add),
            onPressed: () {
              picker.pickMultiImage(maxWidth: 2048, maxHeight: 2048);
            },
          )),
        ),
      ),
    );
  }
}

```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]
![IMG_40BACCDA9573-1](https://github.com/flutter/flutter/assets/94823120/cf55ab37-b9ca-44c9-a056-752da80ca3f3)
![IMG_F22A5B41B9F4-1](https://github.com/flutter/flutter/assets/94823120/fb11ad80-4865-495d-9edd-ff58f0e9f199)

</details>


### Logs

<details><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.13.0, on macOS 13.3 22E252 darwin-arm64, locale en-SA)
    • Flutter version 3.13.0 on channel stable at /Users/moneeroctedia/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision efbf63d9c6 (13 days ago), 2023-08-15 21:05:06 -0500
    • Engine revision 1ac611c64e
    • Dart version 3.1.0
    • DevTools version 2.25.0

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/moneeroctedia/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    ✗ Android SDK file not found: /Users/moneeroctedia/Library/Android/sdk/build-tools/34.0.0/aapt.
    • Try re-installing or updating your Android SDK,
      visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.12.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.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
    • android-studio-dir = /Applications/Android Studio.app
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)

[✓] VS Code (version 1.78.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.70.0

[✓] Connected device (3 available)
    • Octedia’s iPhone (mobile) • 00008110-001E39080182401E • ios            • iOS 16.3.1 20D67
    • macOS (desktop)           • macos                     • darwin-arm64   • macOS 13.3 22E252 darwin-arm64
    • Chrome (web)              • chrome                    • web-javascript • Google Chrome 116.0.5845.110

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.
```

</details>