如何在 Flutter 中将系统剪贴板文本(复制、粘贴等)的语言更改为中文?

How to change language of system clipboard text (Copy, Paste etc.,) to Chinese in Flutter?

我试过了,但似乎不起作用:

new MaterialApp(
  title: 'Mian',
  localizationsDelegates: [
    GlobalMaterialLocalizations.delegate,
    GlobalWidgetsLocalizations.delegate,
  ],
  supportedLocales: [
    const Locale('zh','HK')
  ],

我想把粘贴改成粘贴,Select全部改成选择全部

  1. flutter_localizations添加到pubspec.yaml
dependencies:
  flutter:
    sdk: flutter

  flutter_localizations:
    sdk: flutter
  1. flutter_localizations 导入 main.dart
import 'package:flutter_localizations/flutter_localizations.dart';
  1. 使用supportedLocales
class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Flutter',
      home: new HomePage(title: ''),
      localizationsDelegates: [                             
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
        DefaultCupertinoLocalizations.delegate
      ],
      supportedLocales: [
        const Locale('zh','CH'),
      ],
    );
  }
}