如何解决如何在Flutter中自定义TimePicker小部件
如何从输入时间选择器小部件中更改Purple选择颜色,Purple边框颜色,时间文本颜色以及Hour
和Minute
颜色,似乎无法在{{ 1}}
解决方法
showTimePicker(
context: context,initialTime: TimeOfDay(hour: 10,minute: 47),builder: (context,child) {
return Theme(
data: ThemeData.light().copyWith(
colorScheme: ColorScheme.light(
// change the border color
primary: Colors.red,// change the text color
onSurface: Colors.purple,),// button colors
buttonTheme: ButtonThemeData(
colorScheme: ColorScheme.light(
primary: Colors.green,child: child,);
},);
结果:
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。