如何更改Time_range_picker的颜色

huangapple go评论65阅读模式
英文:

How to change the color of Time_range_picker

问题

我想要更改时间选择器中的蓝色颜色,例如,我想将OK和CANCEL按钮、AM/PM和时间选择的颜色更改为红色。
我已经添加了时间选择器的截图,我是从这里获取的,我下载了文件以更改颜色,但只能更改下划线的时间的颜色(在截图中为红色)。

英文:

I want to change the color blue in this time picker, for example I want to change the color of OK and CANCEL button and AM/PM and time selection to red
I added a screenshot for the time picker and I took it from her, I downloaded the files to change the color but I only be able to change the color of the underlined time (in red in the screenshot)
time_picker screenshot

答案1

得分: 0

如果您想更改TimePicker的样式,您可以在ThemeData中进行更改:

MaterialApp(
  theme: ThemeData(
    timePickerTheme: TimePickerThemeData(
      hourMinuteColor: Colors.green,
      backgroundColor: Colors.black,
    ),
  ),
)
英文:

if you want to change the style of TimePicker you can change it in ThemeData:

 MaterialApp(
     theme:
        ThemeData(
           timePickerTheme: TimePickerThemeData(
              hourMinuteColor: Colors.green,
              backgroundColor: Colors.black,
        )),)

huangapple
  • 本文由 发表于 2023年3月8日 17:59:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/75671592.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定