想在 Flutter中更改
helpText
in的 TextStyle。showDateRangePicker()
任何人都可以帮忙。
buildMaterialDatePicker({BuildContext context, SearchVM model})
async {
final DateTimeRange picked = await showDateRangePicker(
context: context,
firstDate: initialDate,
helpText: 'Select a Date or Date-Range',
fieldStartHintText: 'Start Booking date',
fieldEndHintText: 'End Booking date',
currentDate: initialDate,
lastDate: DateTime(2020, initialDate.month + 1,
initialDate.day),
builder: (BuildContext context, Widget child) {
return Theme(
data: ThemeData.dark().copyWith(
colorScheme: ColorScheme.dark(
primary: Colors.greenAccent,
onPrimary: oppColor,
surface: Colors.greenAccent,
onSurface: oppColor,
),
dialogBackgroundColor: mainColor,
),
child: child,
);
},
);
}