Repository: flutter
Issue: `minimum` causes `SafeArea` to violate documented requirements of `MediaQueryData`
Labels: framework,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-framework,triaged-framework

## Steps to Reproduce

1. Put the example code below into a project and run it
2. Tap the "+" button in the app to swap between two values of `minimum` passed to `SafeArea`
3. Observe that text box moves up and down depending on `minimum`

<img src="https://user-images.githubusercontent.com/8151661/205177930-ba7a4f41-0d6c-4da9-81af-c990c5cfe137.png" width="300"/> <img src="https://user-images.githubusercontent.com/8151661/205177949-6028c508-2e07-45a6-bbf7-0d7ad9eeb134.png" width="300"/>

**Expected results:** <!-- what did you want to see? -->

When `minimum` given to `SafeArea` is less than `viewPadding`, I expect the text box to not move.

**Actual results:** <!-- what did you see? -->

Changing the `minimum` passed to `SafeArea` results in the text box unexpectedly moving in the vertical axis (when `1 <= minimum < viewPadding` and `viewPadding > 0`).

The reason is that `SafeArea` adds padding at the top (in the amount of the given `minimum`), but does **not** also reduce `viewPadding` by an equivalent amount. According to the [`MediaQueryData` documentation](https://api.flutter.dev/flutter/widgets/MediaQueryData-class.html),

> Widgets whose layouts consume space defined by [viewInsets](https://api.flutter.dev/flutter/widgets/MediaQueryData/viewInsets.html), [viewPadding](https://api.flutter.dev/flutter/widgets/MediaQueryData/viewPadding.html), or [padding](https://api.flutter.dev/flutter/widgets/MediaQueryData/padding.html) should enclose their children in secondary MediaQuery widgets **that reduce those properties by the same amount**.

(emphasis added)

In contrast to the documented requirements, when `minimum` is in use, `SafeArea` does not reduce `viewPadding` by the amount of padding space the `SafeArea` consumed to apply the minimum padding.

This means that children who query the `viewPadding` get an incorrect value.

<details>
<summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(primarySwatch: Colors.blue),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});
  @override State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  double _minimum = 0;

  @override
  Widget build(BuildContext context) {
    final mqd = MediaQuery.of(context);
    return Scaffold(
      body: SafeArea(
        top: false,
        minimum: EdgeInsets.all(20).copyWith(top: _minimum),
        child: Stack(
          children: [
            Positioned(
              top: mqd.viewPadding.top,
              child: ColoredBox(
                color: Colors.red[100]!,
                child: Column(
                  children: <Widget>[
                    Text('SafeArea minimum = $_minimum'),
                    Text('viewPadding.top = ${mqd.viewPadding.top}'),
                    Text('viewInsets.top = ${mqd.viewInsets.top}'),
                    Text('padding.top = ${mqd.padding.top}'),
                  ],
                ),
              ),
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () => setState(() { _minimum = 20 - _minimum; }),
        child: const Icon(Icons.add),
      ),
    );
  }
}
```

</details>

<details>
  <summary>Logs</summary>

```
$ flutter doctor -v
[✓] Flutter (Channel stable, 3.3.8, on macOS 12.6.1 21G217 darwin-x64, locale
    en)
    • Flutter version 3.3.8 on channel stable at /Users/chuck/flutter
    • Upstream repository git@github.com:flutter/flutter.git
    • Framework revision 52b3dc25f6 (3 weeks ago), 2022-11-09 12:09:26 +0800
    • Engine revision 857bd6b74c
    • Dart version 2.18.4
    • DevTools version 2.15.0

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from:
      https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK
      components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup
      for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14B47b
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed)
    • Android Studio not found; download from
      https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup
      for detailed instructions).

[✓] VS Code (version 1.73.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.54.0

[✓] Connected device (3 available)
    • iPhone 14 (mobile)        • A4BBA458-399D-44BB-A695-710A1922C53F • ios
      • com.apple.CoreSimulator.SimRuntime.iOS-16-1 (simulator)
    • macOS (desktop)           • macos                                •
      darwin-x64     • macOS 12.6.1 21G217 darwin-x64
    • Chrome (web)              • chrome                               •
      web-javascript • Google Chrome 108.0.5359.71

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 2 categories.
```

</details>