gpt4 book ai didi

android - 日期/时间选择器 flutter : OK/CANCEL button not visible

转载 作者:IT老高 更新时间:2023-10-28 12:41:52 25 4
gpt4 key购买 nike

flutter 中的日期选择器小部件以白色显示确定/取消按钮,因此在白色背景中不可见。

_displayFromDate = await showDatePicker(
context: context,
initialDate: now,
firstDate: now,
lastDate: now.add(new Duration(days: 30)),
);

我尝试将页面主题更改为黑色的主要强调色。还是看不出来。按钮在那里,因为我可以点击它们,只是标题不可见。

[✓] Flutter (Channel master, v1.2.3-pre.67, on Mac OS X 10.13.6 17G5019, locale
en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
[✓] Android Studio (version 3.2)
[✓] Connected device (2 available)

enter image description here

最佳答案

你需要覆盖 - buttonTheme:

theme: ThemeData(
buttonTheme: ButtonThemeData(textTheme: ButtonTextTheme.accent),
accentColor: Colors.black,
primaryColor: Colors.black)

enter image description here

关于android - 日期/时间选择器 flutter : OK/CANCEL button not visible,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54922613/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com