Repository: flutter
Issue: InteractiveViewer - text field is hidden by the keyboard when focused
Labels: a: text input,f: material design,has reproducible steps,P3,team-design,triaged-design,found in release: 3.13,found in release: 3.16

### 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. Run the code sample
2. Scroll all the way to the bottom.
3. Tap on the text field

### Expected results

The text field should move up with the keyboard so that it's not covered. 

### Actual results

The keyboard is hiding the text field.
If I swap this code
```dart
SizedBox(height: MediaQuery.of(context).size.height)
```
with this code
```dart
SizedBox(height: constraints.maxHeight)
```
Then it works as expected

### Code sample

<details><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

class MainScreen extends StatelessWidget {
  const MainScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(
        child: LayoutBuilder(
          builder: (context, constraints) {
            return InteractiveViewer(
              constrained: false,
              child: SizedBox(
                width: constraints.maxWidth,
                child: Padding(
                  padding: const EdgeInsets.all(20),
                  child: Column(
                    children: [
                      const Text('Scroll to the bottom'),
                      SizedBox(height: MediaQuery.of(context).size.height),
                      const TextField(),
                    ],
                  ),
                ),
              ),
            );
          },
        ),
      ),
    );
  }
}

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        inputDecorationTheme: const InputDecorationTheme(
          border: OutlineInputBorder(),
        ),
      ),
      home: const MainScreen(),
    );
  }
}

void main() {
  runApp(const MainApp());
}

```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

https://github.com/flutter/flutter/assets/42715466/d5f390e4-9f45-44ca-b49c-d775b22193ea

</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.4, on macOS 13.3 22E252 darwin-arm64, locale en-IL)
    • Flutter version 3.13.4 on channel stable at /Users/liran/code/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 367f9ea16b (7 weeks ago), 2023-09-12 23:27:53 -0500
    • Engine revision 9064459a8b
    • Dart version 3.1.2
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/liran/Library/Android/sdk
    • Platform android-34, build-tools 32.1.0-rc1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.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 11.0.11+0-b60-7772763)

[✓] VS Code (version 1.83.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.74.0

[✓] Connected device (5 available)
    • sdk gphone64 arm64 (mobile)         • emulator-5554                        • android-arm64  • Android 14 (API 34) (emulator)
    • Liran's iPhone (mobile)             • 00008101-000265A20C84001E            • ios            • iOS 16.6.1 20G81
    • iPhone SE (3rd generation) (mobile) • CA0C2BE5-F68A-4D63-AA8B-B5E82D27F38C • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)                     • macos                                • darwin-arm64   • macOS 13.3 22E252 darwin-arm64
    • Chrome (web)                        • chrome                               • web-javascript • Google Chrome 118.0.5993.117

[✓] Network resources
    • All expected network resources are available.

• No issues found!
```

</details>