我正在使用showDatePicker()方法在flutter应用程序中显示日期选择器。如何设置边框半径并删除标题栏?
下面是我的代码:
showDatePicker(
locale: Locale('ja'),
context: context,
initialDate: _dateTime,
firstDate:
DateTime(DateTime.now().year - 5),
lastDate: DateTime(DateTime.now().year + 5),
builder: (context, child) {
return Theme(
data: ThemeData.light().copyWith(
primaryColor:
helper.hexColor('#007AFF'),
accentColor:
helper.hexColor('#007AFF'),
colorScheme: ColorScheme.light(
primary:
helper.hexColor('#007AFF')),
buttonTheme: ButtonThemeData(
textTheme: ButtonTextTheme
.primary), // This will change to light theme.
),
child: child,
);
},
);
2条答案
按热度按时间ie3xauqp1#
您可以在ThemeData中设置边框半径:
bq9c1y662#
此代码用于控制showDatePicker和borderRadius的大小
}