[英]Cupertino date picker flutter
I am using Cupertino date picker .我正在使用 Cupertino 日期选择器。 I want to achieve something like below image -我想实现如下图所示 -
But currently it's look like below image -但目前它看起来像下图 -
This is my code -这是我的代码 -
CupertinoTheme(
data: CupertinoThemeData(
textTheme: CupertinoTextThemeData(
dateTimePickerTextStyle: TextStyle(
fontSize: 20,
color: Colors.white
),
),
),
child: CupertinoDatePicker(
mode: CupertinoDatePickerMode.date,
onDateTimeChanged: (DateTime dateTime) {},
),
)
How to achieve like first image ?如何实现喜欢第一张图片? Is there any library to achieve similar?是否有任何库可以实现类似的功能?
Not sure if we could do that in CupertinoDatePicker
.不确定我们是否可以在CupertinoDatePicker
中做到这一点。
But但
You could use Flutter Cupertino Date Picker to achieve the layout you want.您可以使用Flutter Cupertino Date Picker来实现您想要的布局。 You could either show it as bottom-sheet or a widget您可以将其显示为底页或小部件
Null Safe Version : flutter_cupertino_datetime_picker空安全版本: flutter_cupertino_datetime_picker
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.