DatePickerThemeData class
Overrides the default values of visual properties for descendant DatePickerDialog widgets.
Descendant widgets obtain the current DatePickerThemeData object with DatePickerTheme.of. Instances of DatePickerTheme can be customized with DatePickerThemeData.copyWith.
Typically a DatePickerTheme is specified as part of the overall Theme with ThemeData.datePickerTheme.
All DatePickerThemeData properties are null by default. When null, the DatePickerDialog computes its own default values, typically based on the overall theme's ThemeData.colorScheme, ThemeData.textTheme, and ThemeData.iconTheme.
- Mixed in types
- Annotations
Constructors
-
DatePickerThemeData({Color? backgroundColor, double? elevation, Color? shadowColor, Color? surfaceTintColor, ShapeBorder? shape, Color? headerBackgroundColor, Color? headerForegroundColor, TextStyle? headerHeadlineStyle, TextStyle? headerHelpStyle, TextStyle? weekdayStyle, TextStyle? dayStyle, MaterialStateProperty<
Color?> ? dayForegroundColor, MaterialStateProperty<Color?> ? dayBackgroundColor, MaterialStateProperty<Color?> ? dayOverlayColor, MaterialStateProperty<OutlinedBorder?> ? dayShape, MaterialStateProperty<Color?> ? todayForegroundColor, MaterialStateProperty<Color?> ? todayBackgroundColor, BorderSide? todayBorder, TextStyle? yearStyle, MaterialStateProperty<Color?> ? yearForegroundColor, MaterialStateProperty<Color?> ? yearBackgroundColor, MaterialStateProperty<Color?> ? yearOverlayColor, Color? rangePickerBackgroundColor, double? rangePickerElevation, Color? rangePickerShadowColor, Color? rangePickerSurfaceTintColor, ShapeBorder? rangePickerShape, Color? rangePickerHeaderBackgroundColor, Color? rangePickerHeaderForegroundColor, TextStyle? rangePickerHeaderHeadlineStyle, TextStyle? rangePickerHeaderHelpStyle, Color? rangeSelectionBackgroundColor, MaterialStateProperty<Color?> ? rangeSelectionOverlayColor, Color? dividerColor, InputDecorationTheme? inputDecorationTheme, ButtonStyle? cancelButtonStyle, ButtonStyle? confirmButtonStyle, Locale? locale}) -
Creates a DatePickerThemeData that can be used to override default properties
in a DatePickerTheme widget.
const
Properties
- backgroundColor → Color?
-
Overrides the default value of Dialog.backgroundColor.
final
- cancelButtonStyle → ButtonStyle?
-
Overrides the default style of the cancel button of a DatePickerDialog.
final
- confirmButtonStyle → ButtonStyle?
-
Overrides the default style of the confirm (OK) button of a DatePickerDialog.
final
-
dayBackgroundColor
→ MaterialStateProperty<
Color?> ? -
Overrides the default color used to paint the background of the
day labels in the grid of the date picker.
final
-
dayForegroundColor
→ MaterialStateProperty<
Color?> ? -
Overrides the default color used to paint the day labels in the
grid of the date picker.
final
-
dayOverlayColor
→ MaterialStateProperty<
Color?> ? -
Overrides the default highlight color that's typically used to
indicate that a day in the grid is focused, hovered, or pressed.
final
-
dayShape
→ MaterialStateProperty<
OutlinedBorder?> ? -
Overrides the default shape used to paint the shape decoration of the
day labels in the grid of the date picker.
final
- dayStyle → TextStyle?
-
Overrides the default text style used for each individual day
label in the grid of the date picker.
final
- dividerColor → Color?
-
Overrides the default color used to paint the horizontal divider
below the header text when dialog is in portrait orientation
and vertical divider when the dialog is in landscape orientation.
final
- elevation → double?
-
Overrides the default value of Dialog.elevation.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- headerBackgroundColor → Color?
-
Overrides the header's default background fill color.
final
- headerForegroundColor → Color?
-
Overrides the header's default color used for text labels and icons.
final
- headerHeadlineStyle → TextStyle?
-
Overrides the header's default headline text style.
final
- headerHelpStyle → TextStyle?
-
Overrides the header's default help text style.
final
- inputDecorationTheme → InputDecorationTheme?
-
Overrides the InputDatePickerFormField's input decoration theme.
If this is null, ThemeData.inputDecorationTheme is used instead.
final
- locale → Locale?
-
An optional locale argument can be used to set the locale for the date
picker. It defaults to the ambient locale provided by Localizations.
final
- rangePickerBackgroundColor → Color?
-
Overrides the default Scaffold.backgroundColor for
DateRangePickerDialog.
final
- rangePickerElevation → double?
-
Overrides the default elevation of the full screen
DateRangePickerDialog.
final
- rangePickerHeaderBackgroundColor → Color?
-
Overrides the default background fill color for DateRangePickerDialog.
final
- rangePickerHeaderForegroundColor → Color?
-
Overrides the default color used for text labels and icons in
the header of a full screen DateRangePickerDialog
final
- rangePickerHeaderHeadlineStyle → TextStyle?
-
Overrides the default text style used for the headline text in
the header of a full screen DateRangePickerDialog.
final
- rangePickerHeaderHelpStyle → TextStyle?
-
Overrides the default text style used for the help text of the
header of a full screen DateRangePickerDialog.
final
- rangePickerShadowColor → Color?
-
Overrides the color of the shadow painted below a full screen
DateRangePickerDialog.
final
- rangePickerShape → ShapeBorder?
-
Overrides the default overall shape of a full screen
DateRangePickerDialog.
final
- rangePickerSurfaceTintColor → Color?
-
Overrides the default color of the surface tint overlay applied
to the backgroundColor of a full screen
DateRangePickerDialog's to indicate elevation.
final
- rangeSelectionBackgroundColor → Color?
-
Overrides the default background color used to paint days
selected between the start and end dates in a
DateRangePickerDialog.
final
-
rangeSelectionOverlayColor
→ MaterialStateProperty<
Color?> ? -
Overrides the default highlight color that's typically used to
indicate that a date in the selected range of a
DateRangePickerDialog is focused, hovered, or pressed.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shadowColor → Color?
-
Overrides the default value of Dialog.shadowColor.
final
- shape → ShapeBorder?
-
Overrides the default value of Dialog.shape.
final
- surfaceTintColor → Color?
-
Overrides the default value of Dialog.surfaceTintColor.
final
-
todayBackgroundColor
→ MaterialStateProperty<
Color?> ? -
Overrides the default color used to paint the background of the
DatePickerDialog.currentDate label in the grid of the date picker.
final
- todayBorder → BorderSide?
-
Overrides the border used to paint the
DatePickerDialog.currentDate label in the grid of the date
picker.
final
-
todayForegroundColor
→ MaterialStateProperty<
Color?> ? -
Overrides the default color used to paint the
DatePickerDialog.currentDate label in the grid of the dialog's
CalendarDatePicker and the corresponding year in the dialog's
YearPicker.
final
- weekdayStyle → TextStyle?
-
Overrides the default text style used for the row of weekday
labels at the top of the date picker grid.
final
-
yearBackgroundColor
→ MaterialStateProperty<
Color?> ? -
Overrides the default color used to paint the background of the
year labels in the year selector of the of the date picker.
final
-
yearForegroundColor
→ MaterialStateProperty<
Color?> ? -
Overrides the default color used to paint the year labels in the year
selector of the date picker.
final
-
yearOverlayColor
→ MaterialStateProperty<
Color?> ? -
Overrides the default highlight color that's typically used to
indicate that a year in the year selector is focused, hovered,
or pressed.
final
- yearStyle → TextStyle?
-
Overrides the default text style used to paint each of the year
entries in the year selector of the date picker.
final
Methods
-
copyWith(
{Color? backgroundColor, double? elevation, Color? shadowColor, Color? surfaceTintColor, ShapeBorder? shape, Color? headerBackgroundColor, Color? headerForegroundColor, TextStyle? headerHeadlineStyle, TextStyle? headerHelpStyle, TextStyle? weekdayStyle, TextStyle? dayStyle, MaterialStateProperty< Color?> ? dayForegroundColor, MaterialStateProperty<Color?> ? dayBackgroundColor, MaterialStateProperty<Color?> ? dayOverlayColor, MaterialStateProperty<OutlinedBorder?> ? dayShape, MaterialStateProperty<Color?> ? todayForegroundColor, MaterialStateProperty<Color?> ? todayBackgroundColor, BorderSide? todayBorder, TextStyle? yearStyle, MaterialStateProperty<Color?> ? yearForegroundColor, MaterialStateProperty<Color?> ? yearBackgroundColor, MaterialStateProperty<Color?> ? yearOverlayColor, Color? rangePickerBackgroundColor, double? rangePickerElevation, Color? rangePickerShadowColor, Color? rangePickerSurfaceTintColor, ShapeBorder? rangePickerShape, Color? rangePickerHeaderBackgroundColor, Color? rangePickerHeaderForegroundColor, TextStyle? rangePickerHeaderHeadlineStyle, TextStyle? rangePickerHeaderHelpStyle, Color? rangeSelectionBackgroundColor, MaterialStateProperty<Color?> ? rangeSelectionOverlayColor, Color? dividerColor, InputDecorationTheme? inputDecorationTheme, ButtonStyle? cancelButtonStyle, ButtonStyle? confirmButtonStyle, Locale? locale}) → DatePickerThemeData - Creates a copy of this object with the given fields replaced with the new values.
-
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
Static Methods
-
lerp(
DatePickerThemeData? a, DatePickerThemeData? b, double t) → DatePickerThemeData - Linearly interpolates between two DatePickerThemeData.