CalendarTheme class

Color theme for the calendar bottom sheet

Provides customizable colors for all visual elements of the date picker. Use CalendarTheme.light or CalendarTheme.dark for predefined themes, or create a custom theme using the constructor.

Constructors

CalendarTheme({Color backgroundColor = Colors.white, Color primaryColor = Colors.black, Color textColor = Colors.black87, Color selectedColor = Colors.blue, Color dividerColor = Colors.grey, Color buttonColor = Colors.black, Color buttonTextColor = Colors.white, Color titleColor = Colors.black87, Color handleColor = Colors.grey})
Creates a custom calendar theme with the specified colors.
const

Properties

backgroundColor Color
Background color of the bottom sheet
final
buttonColor Color
Background color of the confirmation button
final
buttonTextColor Color
Text color of the confirmation button
final
dividerColor Color
Color for divider lines between pickers
final
handleColor Color
Color for the drag handle at the top of the sheet
final
hashCode int
The hash code for this object.
no setterinherited
primaryColor Color
Primary color used for main elements
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedColor Color
Color for selected/highlighted items
final
textColor Color
Text color for regular text elements
final
titleColor Color
Color for the bottom sheet title
final

Methods

copyWith({Color? backgroundColor, Color? primaryColor, Color? textColor, Color? selectedColor, Color? dividerColor, Color? buttonColor, Color? buttonTextColor, Color? titleColor, Color? handleColor}) CalendarTheme
Creates a copy of this theme with the given fields replaced with new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

dark → const CalendarTheme
Predefined dark theme with black background and white text
light → const CalendarTheme
Predefined light theme with white background and black text