textStyle property
The text style for the text in the SfDateRangePicker view header view of month view.
Defaults to null.
Using a SfDateRangePickerTheme
gives more fine-grained control over the
appearance of various components of the date range picker.
See also:
- backgroundColor, which fills the background of the view header view in the date range picker.
- DateRangePickerMonthViewSettings.viewHeaderHeight, which is the size for the view header view in date range picker.
- SfDateRangePicker.todayHighlightColor, which highlights the today date in the date range picker.
- Knowledge base: How to replace the view header with the custom widget
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: SfDateRangePicker(
controller: _pickerController,
view: DateRangePickerView.month,
selectionMode: DateRangePickerSelectionMode.single,
monthViewSettings: DateRangePickerMonthViewSettings(
viewHeaderStyle: DateRangePickerViewHeaderStyle(
textStyle: TextStyle(
fontWeight: FontWeight.w500,
fontStyle: FontStyle.italic,
fontSize: 20,
color: Colors.white))),
),
),
);
}
Implementation
final TextStyle? textStyle;