Repository: flutter
Issue: [DropdownMenu] Add ability to customize input decoration when the trailing button is pressed
Labels: c: new feature,framework,f: material design,c: proposal,P3,team-design,triaged-design

### Steps to reproduce

1. Run the code sample
2. Open/close the DropdownMenu 

### Expected results

The border color should change when the menu is open. Notice in the video/code below, how using the same property the TextField changes the border color.



### Actual results

The border color don't change

### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const DropdownMenuExample());
}

class DropdownMenuExample extends StatefulWidget {
  const DropdownMenuExample({super.key});

  @override
  State<DropdownMenuExample> createState() => _DropdownMenuExampleState();
}

class _DropdownMenuExampleState extends State<DropdownMenuExample> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        useMaterial3: true,
        colorSchemeSeed: Colors.green,
      ),
      home: Scaffold(
        body: SafeArea(
          child: Column(
            children: <Widget>[
              Padding(
                padding: const EdgeInsets.symmetric(vertical: 20),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: <Widget>[
                    DropdownMenu<int>(
                      inputDecorationTheme: InputDecorationTheme(
                        border: MaterialStateOutlineInputBorder.resolveWith(
                          (states) => states.contains(MaterialState.focused)
                              ? const OutlineInputBorder(borderSide: BorderSide(color: Colors.red))
                              : const OutlineInputBorder(
                                  borderSide: BorderSide(color: Colors.blue),
                                ),
                        ),
                      ),
                      initialSelection: 1,
                      onSelected: (_) {},
                      dropdownMenuEntries: [
                        for (int i = 1; i <= 5; i++)
                          DropdownMenuEntry<int>(
                            value: i,
                            label: i.toString(),
                          ),
                      ],
                    ),
                    const SizedBox(width: 50),
                    Flexible(
                      child: TextField(
                        decoration: InputDecoration(
                          border: MaterialStateOutlineInputBorder.resolveWith(
                            (states) => states.contains(MaterialState.focused)
                                ? const OutlineInputBorder(borderSide: BorderSide(color: Colors.red))
                                : const OutlineInputBorder(
                                    borderSide: BorderSide(color: Colors.blue),
                                  ),
                          ),
                        ),
                      ),
                    ),
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[bug.webm](https://github.com/flutter/flutter/assets/74194123/d2e89171-741a-423f-a31b-22b3306de922)

</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.19.0, on Ubuntu 22.04.4 LTS 6.5.0-26-generic,
    locale en_US.UTF-8)
    • Flutter version 3.19.0 on channel stable at
      /home/user/fvm/versions/3.19.0
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision bae5e49bc2 (6 weeks ago), 2024-02-13 17:46:18 -0800
    • Engine revision 04817c99c9
    • Dart version 3.3.0
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at
      ...
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /home/user/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build
      17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✗] Linux toolchain - develop for Linux desktop
    ✗ clang++ is required for Linux development.
      It is likely available from your distribution (e.g.: apt install clang),
      or can be downloaded from https://releases.llvm.org/
    ✗ CMake is required for Linux development.
      It is likely available from your distribution (e.g.: apt install cmake),
      or can be downloaded from https://cmake.org/download/
    ✗ ninja is required for Linux development.
      It is likely available from your distribution (e.g.: apt install
      ninja-build), or can be downloaded from
      https://github.com/ninja-build/ninja/releases
    ✗ pkg-config is required for Linux development.
      It is likely available from your distribution (e.g.: apt install
      pkg-config), or can be downloaded from
      https://www.freedesktop.org/wiki/Software/pkg-config/

[✓] Android Studio (version 2023.2)
    • Android Studio at /home/andry/android-studio/
    • Flutter plugin version 78.4.1
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • android-studio-dir = /home/andry/android-studio/
    • Java version OpenJDK Runtime Environment (build
      17.0.9+0-17.0.9b1087.7-11185874)

[!] Android Studio (version unknown)
    • Android Studio at /home/user/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
    ✗ Unable to determine Android Studio version.
    • Java version OpenJDK Runtime Environment (build
      17.0.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.87.2)
    • VS Code at /usr/share/code
    • Flutter extension version 3.84.0

[✓] Connected device (3 available)
    • Android SDK built for x86 64 (mobile) • emulator-5554 • android-x64    •
      Android 6.0 (API 23) (emulator)
    • Linux (desktop)                       • linux         • linux-x64      •
      Ubuntu 22.04.4 LTS 6.5.0-26-generic
    • Chrome (web)                          • chrome        • web-javascript •
      Google Chrome 123.0.6312.58

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.

```

</details>