DateRangePickerHeaderStyle class
Sets the style for customizing the SfDateRangePicker header view.
Allows to customize the textStyle, textAlign and backgroundColor of the header view in SfDateRangePicker.
See also:
- DateRangePickerMonthViewSettings, which allows to customize the month view of the date range picker.
- DateRangePickerViewHeaderStyle, which allows to customize the view header view of the month view in date range picker.
- SfDateRangePicker.headerHeight, which is the size of the header view in the date range picker.
- SfDateRangePicker.showNavigationArrow, which displays the navigation arrows on the header view of the date range picker.
- SfDateRangePicker.monthFormat, which allows to customize the month text in the header view also in the year cell view of date range picker.
- Knowledge base: How to style a header
- Knowledge base: How to select all days when clicking on the day header
- Knowledge base: How to restrict the year view navigation when tapping on header view
- Knowledge base: How to customize the header in Flutter multi date range picker
- Knowledge base: How to customize the header view
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: SfDateRangePicker(
view: DateRangePickerView.month,
headerStyle: DateRangePickerHeaderStyle(
textAlign: TextAlign.left,
textStyle: TextStyle(
color: Colors.blue, fontSize: 18,
fontWeight: FontWeight.w400),
backgroundColor: Colors.grey,
),
),
),
);
}
- Mixed-in types
- Annotations
Constructors
- DateRangePickerHeaderStyle({TextAlign textAlign = TextAlign.left, Color? backgroundColor, TextStyle? textStyle})
-
Creates a header style for date range picker.
const
Properties
- backgroundColor → Color?
-
The color which fills the SfDateRangePicker header view background.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- textAlign → TextAlign
-
How the text should be aligned horizontally in SfDateRangePicker header
view.
final
- textStyle → TextStyle?
-
The text style for the text in the SfDateRangePicker header view.
final
Methods
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override