Repository: flutter
Issue: TextField textbaseline ignores padding with outline border
Labels: a: text input,framework,f: material design,has reproducible steps,found in release: 3.7,found in release: 3.10,team-design

### 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

Create a textfield with an outlined input border and text align top. Give the content padding more padding on the top than the bottom. e.g. 50 top, 10 bottom

Ways to workaround this issue and get the expected result: Set "isCollapsed" to true, then it behaves like that because of this code:
- Class: _RenderDecoration
- Method: _isOutlineAligned -> `return !decoration.isCollapsed && decoration.border.isOutline;`
- Why does this work?
- - Class: _RenderDecoration
- - Method: performLayout -> `baseline = _isOutlineAligned ? layout.outlineBaseline : layout.inputBaseline;`

With `isCollapsed: true` the textfield uses the inputBaseline, not the outlineBaseline. But why is outlineBaseline wrong?

I suspect this piece of code:

- Class: _RenderDecoration
- Method: _layout
```
    // The three main alignments for the baseline when an outline is present are
    //
    //  * top (-1.0): topmost point considering padding.
    //  * center (0.0): the absolute center of the input ignoring padding but
    //      accommodating the border and floating label.
    //  * bottom (1.0): bottommost point considering padding.
    //
    // That means that if the padding is uneven, center is not the exact
    // midpoint of top and bottom. To account for this, the above center and
    // below center alignments are interpolated independently.
    final double outlineCenterBaseline =
        inputInternalBaseline + baselineAdjustment / 2.0 + (containerHeight - (2.0 + inputHeight)) / 2.0;
    final double outlineTopBaseline = topInputBaseline;
    final double outlineBottomBaseline = topInputBaseline + maxVerticalOffset;
    final double outlineBaseline = _interpolateThree(
      outlineTopBaseline,
      outlineCenterBaseline,
      outlineBottomBaseline,
      textAlignVertical,
    );
```

See the last call to `_interpolateThree`
```
    if (textAlignVertical.y <= 0) {
      // It's possible for begin, middle, and end to not be in order because of
      // excessive padding. Those cases are handled by using middle.
      if (begin >= middle) {
        return middle;
      }
      // Do a standard linear interpolation on the first half, between begin and
      // middle.
      final double t = textAlignVertical.y + 1;
      return begin + (middle - begin) * t;
    }
```

This forces the baseline in outlineBorders to be center if the top padding pushes the baseline to be further south than the center. It just doesn't really make sense to me. I can force the baseline to be down with my padding and just set `isCollapsed` to true, but I don' want that, as I need the label and hint texts in my textfield. With `isCollapsed` true, they are gone.

### Expected results

The text should be padded top with 50 pixels and bottom with 10.

### Actual results

The text is centered

### Code sample

<details><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MainApp());
}

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Scaffold(
        body: Center(
            child: TextField(
          decoration: InputDecoration(
            border: OutlineInputBorder(),
            contentPadding: EdgeInsets.fromLTRB(10, 50, 10, 10),
          ),
          textAlignVertical: TextAlignVertical.top,
        )),
      ),
    );
  }
}

```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

Expected:
![grafik](https://user-images.githubusercontent.com/72435900/231773120-ebf2b678-fa2d-470f-a27c-5d2ce9a2b8ea.png)

Actual:
![grafik](https://user-images.githubusercontent.com/72435900/231772538-89dbdc9a-6bdc-414f-b3e1-0fc64c0be178.png)

</details>


### Logs

_No response_

### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
PS D:\Entwicklung\Flutter\flutter_jvx> flutter doctor -v
[√] Flutter (Channel stable, 3.7.10, on Microsoft Windows [Version 10.0.19044.2846], locale de-AT)
    • Flutter version 3.7.10 on channel stable at C:\tools\Flutter\Flutter_aktuell
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4b12645012 (10 days ago), 2023-04-03 17:46:48 -0700
    • Engine revision ec975089ac
    • Dart version 2.19.6
    • DevTools version 2.20.1

[X] Windows Version (Unable to confirm if installed Windows version is 10 or greater)

[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at C:\Users\theiss\AppData\Local\Android\sdk
    • Platform android-33, build-tools 31.0.0
    • Java binary at: C:\tools\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[√] Android Studio (version 2020.3)
    • Android Studio at C:\tools\Android Studio
    • 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.10+0-b96-7249189)

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19044.2846]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 111.0.5563.148
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 111.0.1661.44

[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 2 categories.
```

</details>