Repository: flutter
Issue: [Desktop app]Can not restrict candidate list on password field 
Labels: a: text input,framework,engine,a: internationalization,a: desktop,has reproducible steps,P3,found in release: 3.13,found in release: 3.14,team-text-input,triaged-text-input

### Steps to reproduce

1、Built a password input box using TextField.
2、Switched the input method to Chinese.
3、Then entered the password in the constructed input box.

### Expected results

It cannot restrict the entry of Chinese characters and cannot automatically switch to English mode.

### Actual results

It cannot restrict the entry of Chinese characters and cannot automatically switch to English mode.

### Code sample

<details><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

/// Flutter code sample for [TextField].

class ObscuredTextFieldSample extends StatelessWidget {
  const ObscuredTextFieldSample({super.key});

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: 250,
      child: TextField(
        inputFormatters: [
          FilteringTextInputFormatter.deny(RegExp("[\u4e00-\u9fa5]")),
        ],
        autofocus: false,
        obscureText: true,
        keyboardType: TextInputType.visiblePassword,
        textInputAction: TextInputAction.next,
        decoration: InputDecoration(
          border: OutlineInputBorder(),
          labelText: 'Password',
        ),
      ),
    );
  }
}

class TextFieldExampleApp extends StatelessWidget {
  const TextFieldExampleApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Demo')),
        body: const Center(
          child: ObscuredTextFieldSample(),
        ),
      ),
    );
  }
}

void main() => runApp(const TextFieldExampleApp());

```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

Other languages, such as QT and Objective-C, can achieve the following: automatically restrict the use of Chinese input methods.
![OK](https://github.com/flutter/flutter/assets/44550529/cd5f3173-f095-4173-b4b2-9e4d608c01c2)

However, it doesn't work in Flutter.
![NG](https://github.com/flutter/flutter/assets/44550529/5912075b-9869-4624-8a17-b1c6e635103a)

</details>

### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[!] Flutter (Channel unknown, 3.10.2, on macOS 13.5.1 22G90 darwin-arm64, locale
    zh-Hans-CN)
    ! Flutter version 3.10.2 on channel unknown at
      /Users/steven/Steven/Work/DevelopTools/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an
      official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions
      at https://flutter.dev/docs/get-started/install.
    ! Unknown upstream repository.
      Reinstall Flutter by following instructions at
      https://flutter.dev/docs/get-started/install.
    • Framework revision 9cd3d0d9ff (4 months ago), 2023-05-23 20:57:28 -0700
    • Engine revision 90fa3ae28f
    • Dart version 3.0.2
    • DevTools version 2.23.1
    • Pub download mirror https://pub.dartlang.org
    • Flutter download mirror https://storage.flutter-io.cn
    • If those were intentional, you can disregard the above warnings; however
      it is recommended to use "git" directly to perform update checks and
      upgrades.

[!] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /Users/steven/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for
      more details.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • 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).

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 74.0.4
    • Dart plugin version 231.9161.14

[✓] VS Code (version 1.81.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.70.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.5.1 22G90
      darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 116.0.5845.179

[✓] Network resources
    • All expected network resources are available.
```

</details>