加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

android – 日期/时间选择器颤振:OK / CANCEL按钮不可见

发布时间:2020-12-14 14:50:24 所属栏目:百科 来源:网络整理
导读:flutter中的日期选择器小部件以白色显示ok / cancel按钮,因此在白色背景中不可见. _displayFromDate = await showDatePicker( context: context,initialDate: now,firstDate: now,lastDate: now.add(new Duration(days: 30)),); 我尝试用主要的强调颜色更改
flutter中的日期选择器小部件以白色显示ok / cancel按钮,因此在白色背景中不可见.

_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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读