textStyle property
The text style for the text in the SfDateRangePicker header 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:
- SfDateRangePicker.monthFormat, which allows to customize the month text in the header view also in the year cell view of date range picker.
- textAlign, which aligns the text in the header view of the date range picker.
- textStyle, which fills the background of the header view in the date range picker.
- Knowledge base: How to style a header
- Knowledge base: How to customize the header view
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: SfDateRangePicker(
controller: _pickerController,
view: DateRangePickerView.month,
selectionMode: DateRangePickerSelectionMode.single,
headerStyle: DateRangePickerHeaderStyle(
textStyle: TextStyle(
color: Colors.blue,
fontSize: 18,
fontWeight: FontWeight.w400),
)),
),
);
}
Implementation
final TextStyle? textStyle;