CustomDatePickerThemeData class

Colors, sizes, and text styles shared by every picker view.

Start from minimal or material, then change only what you need:

CustomDatePickerThemeData.minimal.copyWith(
  accent: Colors.deepOrange,
  buttonHeight: 56,
  buttonRadius: 8,
  confirmBackground: Colors.deepOrange,
)

Named to avoid Flutter's own DatePickerTheme from the Material library.

Constructors

CustomDatePickerThemeData({required Color ink, required Color muted, required Color accent, required Color onAccent, required Color sheet, required Color highlight, required Color line, required Color fieldFill, required Color error, required double radius, Color? confirmBackground, Color? confirmForeground, Color? cancelBackground, Color? cancelForeground, Color? cancelBorder, Color? todayForeground, Color? disabledButton, Color? selectedDay, Color? selectedDayText, Color? iconColor, double buttonHeight = 48, double buttonRadius = 14, double buttonFontSize = 14, double buttonGap = 12, EdgeInsetsGeometry buttonPadding = EdgeInsets.zero, TextStyle? buttonTextStyle, ButtonStyle? confirmButtonStyle, ButtonStyle? cancelButtonStyle, ButtonStyle? todayButtonStyle, String confirmText = 'Confirm', String cancelText = 'Cancel', String todayText = 'Today', String nowText = 'Now', double sheetRadius = 28, EdgeInsetsGeometry sheetMargin = const EdgeInsets.fromLTRB(12, 0, 12, 12), EdgeInsetsGeometry sheetPadding = const EdgeInsets.fromLTRB(20, 10, 20, 16), EdgeInsetsGeometry fieldPadding = const EdgeInsets.fromLTRB(14, 12, 8, 12), EdgeInsetsGeometry fieldContentPadding = const EdgeInsets.symmetric(horizontal: 16, vertical: 14), double borderWidth = 1, double labelFontSize = 14, double valueFontSize = 20, double captionFontSize = 11, double previewFontSize = 28, double rangePreviewFontSize = 22, double subtitleFontSize = 13, double errorFontSize = 12, double weekdayFontSize = 12, double monthTitleFontSize = 16, double dayFontSize = 14, double wheelFontSize = 16, double wheelSelectedFontSize = 18, TextStyle? labelTextStyle, TextStyle? valueTextStyle, TextStyle? captionTextStyle, TextStyle? previewTextStyle, TextStyle? errorTextStyle, double dayCellSize = 32, double dayGridExtent = 40, double wheelHeight = 196, double wheelItemExtent = 44, double iconSize = 24, double clearIconSize = 18})
const

Properties

accent → Color
final
borderWidth → double
final
buttonFontSize → double
final
buttonGap → double
final
buttonHeight → double
final
buttonPadding → EdgeInsetsGeometry
final
buttonRadius → double
final
buttonTextStyle → TextStyle?
final
cancelBackground → Color?
Falls back to transparent when null.
final
cancelBorder → Color?
Falls back to line when null.
final
cancelButtonStyle → ButtonStyle?
final
cancelForeground → Color?
Falls back to ink when null.
final
cancelStyle → ButtonStyle
no setter
cancelText → String
final
captionFontSize → double
final
captionTextStyle → TextStyle?
final
clearIconSize → double
final
confirmBackground → Color?
Falls back to accent when null.
final
confirmButtonStyle → ButtonStyle?
final
confirmForeground → Color?
Falls back to onAccent when null.
final
confirmStyle → ButtonStyle
no setter
confirmText → String
final
dayCellSize → double
final
dayFontSize → double
final
dayGridExtent → double
final
disabledButton → Color?
Falls back to line when null.
final
error → Color
final
errorFontSize → double
final
errorTextStyle → TextStyle?
final
fieldContentPadding → EdgeInsetsGeometry
final
fieldFill → Color
final
fieldPadding → EdgeInsetsGeometry
final
hashCode → int
The hash code for this object.
no setterinherited
highlight → Color
final
iconColor → Color?
Falls back to accent when null.
final
iconSize → double
final
ink → Color
final
labelFontSize → double
final
labelTextStyle → TextStyle?
final
line → Color
final
monthTitleFontSize → double
final
muted → Color
final
nowText → String
final
onAccent → Color
final
previewFontSize → double
final
previewTextStyle → TextStyle?
final
radius → double
final
rangePreviewFontSize → double
final
resolvedCancelBorder → Color
no setter
resolvedCancelForeground → Color
no setter
resolvedConfirmBackground → Color
no setter
resolvedConfirmForeground → Color
no setter
resolvedDisabledButton → Color
no setter
resolvedIconColor → Color
no setter
resolvedSelectedDay → Color
no setter
resolvedSelectedDayText → Color
no setter
resolvedTodayForeground → Color
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedDay → Color?
Falls back to accent when null.
final
selectedDayText → Color?
Falls back to onAccent when null.
final
sheet → Color
final
sheetMargin → EdgeInsetsGeometry
final
sheetPadding → EdgeInsetsGeometry
final
sheetRadius → double
final
subtitleFontSize → double
final
todayButtonStyle → ButtonStyle?
final
todayForeground → Color?
Falls back to accent when null.
final
todayStyle → ButtonStyle
no setter
todayText → String
final
valueFontSize → double
final
valueTextStyle → TextStyle?
final
weekdayFontSize → double
final
wheelFontSize → double
final
wheelHeight → double
final
wheelItemExtent → double
final
wheelSelectedFontSize → double
final

Methods

copyWith({Color? ink, Color? muted, Color? accent, Color? onAccent, Color? sheet, Color? highlight, Color? line, Color? fieldFill, Color? error, double? radius, Color? confirmBackground, Color? confirmForeground, Color? cancelBackground, Color? cancelForeground, Color? cancelBorder, Color? todayForeground, Color? disabledButton, Color? selectedDay, Color? selectedDayText, Color? iconColor, double? buttonHeight, double? buttonRadius, double? buttonFontSize, double? buttonGap, EdgeInsetsGeometry? buttonPadding, TextStyle? buttonTextStyle, ButtonStyle? confirmButtonStyle, ButtonStyle? cancelButtonStyle, ButtonStyle? todayButtonStyle, String? confirmText, String? cancelText, String? todayText, String? nowText, double? sheetRadius, EdgeInsetsGeometry? sheetMargin, EdgeInsetsGeometry? sheetPadding, EdgeInsetsGeometry? fieldPadding, EdgeInsetsGeometry? fieldContentPadding, double? borderWidth, double? labelFontSize, double? valueFontSize, double? captionFontSize, double? previewFontSize, double? rangePreviewFontSize, double? subtitleFontSize, double? errorFontSize, double? weekdayFontSize, double? monthTitleFontSize, double? dayFontSize, double? wheelFontSize, double? wheelSelectedFontSize, TextStyle? labelTextStyle, TextStyle? valueTextStyle, TextStyle? captionTextStyle, TextStyle? previewTextStyle, TextStyle? errorTextStyle, double? dayCellSize, double? dayGridExtent, double? wheelHeight, double? wheelItemExtent, double? iconSize, double? clearIconSize}) → CustomDatePickerThemeData
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
style({required double fontSize, required FontWeight weight, required Color color, TextStyle? override, double? letterSpacing, double? height}) → TextStyle
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited