CalendarDateRangePicker class

Displays a scrollable calendar grid that allows a user to select a range of dates.

Inheritance

Constructors

CalendarDateRangePicker({Key? key, DateTime? initialStartDate, DateTime? initialEndDate, required DateTime firstDate, required DateTime lastDate, DateTime? currentDate, required ValueChanged<DateTime>? onStartDateChanged, required ValueChanged<DateTime?>? onEndDateChanged, Color? highLightColor, Color? selectedColor, TextStyle? selectedTextStyle, TextStyle? disabledTexStyle, bool? showPresentDay, Color? currentDayStrokeColor, double? itemHeight, Color? splashColor, double? spaceBetweenEachMonth, TextStyle? dayTextStyle, double? spaceBetweenRows, double? monthNameHeight, TextStyle? monthTextStyle, TextStyle? daysHeaderTexStyle})
Creates a scrollable calendar grid for picking date ranges.

Properties

currentDate DateTime
The DateTime representing today. It will be highlighted in the day grid.
final
currentDayStrokeColor Color?
The current day gets a different text color and a circle stroke border. This prop only shows effect when showPresentDay is true.
final
daysHeaderTexStyle TextStyle?
Text style for days. By default the text style will be themeData.textTheme.subtitle2.
final
dayTextStyle TextStyle?
The text style for all days. By default the text style is textTheme.bodyText2.
final
disabledTexStyle TextStyle?
Text style for the disabled day items.
final
firstDate DateTime
The earliest allowable DateTime that the user can select.
final
hashCode int
The hash code for this object.
no setterinherited
highLightColor Color?
The highlight color for the the selected dates By default the color will be colorScheme.primary.
final
initialEndDate DateTime?
The DateTime that represents the end of the initial date range selection.
final
initialStartDate DateTime?
The DateTime that represents the start of the initial date range selection.
final
itemHeight double?
Item height of each day in month.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lastDate DateTime
The latest allowable DateTime that the user can select.
final
monthNameHeight double?
Height of the month name widget.
final
monthTextStyle TextStyle?
Text style for month names.
final
onEndDateChanged ValueChanged<DateTime?>?
Called when the user changes the end date of the selected range.
final
onStartDateChanged ValueChanged<DateTime>?
Called when the user changes the start date of the selected range.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedColor Color?
The color of the selected dates.
final
selectedTextStyle TextStyle?
Text style for the selected day items.
final
showPresentDay bool?
Boolean to hide or show the selection of current date. By default the value will be true.
final
spaceBetweenEachMonth double?
Space between each month. By default the height between each month will be 12.
final
spaceBetweenRows double?
Space between rows.
final
splashColor Color?
The splash color for each day of the month. By default the value will be ColorScheme.primary.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _CalendarDateRangePickerState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
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
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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