尝试设置过hintTextStyle的字体大小和Locale单数不生效,光标还是没有对齐hintText的内容。
问题如标题所述,直接看代码,理解比较快。
我github提问的链接地址:https://github.com/flutter/flutter/issues/43482
代码如下:
class FlutterDemoApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
localizationsDelegates: [
GlobalWidgetsLocalizations.delegate,
GlobalMaterialLocalizations.delegate
],
locale: const Locale('zh'),
supportedLocales: [const Locale('en'), const Locale('zh')],
home: Home(),
);
}
}
class _HomeState extends State<Home> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Padding(
padding: const EdgeInsets.all(32.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
TextField(
decoration: InputDecoration(
hintText: '提示',
hintStyle: TextStyle(
fontSize: 16,
locale: Locale('en', 'US')
),
border: OutlineInputBorder(),
),
),
],
),
),
);
}
}
https://github.com/flutter/fl... 解决了