ZdsDateRangePickerDialog class

A Material-style date range picker dialog.

It is used internally by showDateRangePicker or can be directly pushed onto the Navigator stack to enable state restoration. See showDateRangePicker for a state restoration app example.

See also:

Inheritance
Available Extensions

Constructors

ZdsDateRangePickerDialog({required DateTime firstDate, required DateTime lastDate, Key? key, DateTimeRange? initialDateRange, DateTime? currentDate, DatePickerEntryMode initialEntryMode = DatePickerEntryMode.calendar, String? helpText, String? cancelText, String? confirmText, String? saveText, String? errorInvalidRangeText, String? errorFormatText, String? errorInvalidText, String? fieldStartHintText, String? fieldEndHintText, String? fieldStartLabelText, String? fieldEndLabelText, String? restorationId, List<Widget>? actions, String? clearButtonString, String? applyButtonString, bool isWeekMode = false, int? startDayOfWeek, String? shortMonthDayFormat, String? shortDateFormat})
A Material-style date range picker dialog.
const

Properties

actions List<Widget>?
Optional list of widgets to display within the top action bar of the widget.
final
applyButtonString String?
String to display on UI for apply button.
final
cancelText String?
The label on the cancel button for the text input mode.
final
clearButtonString String?
String to display on UI for clear button.
final
confirmText String?
The label on the "OK" button for the text input mode.
final
currentDate DateTime?
The currentDate represents the current day (i.e. today).
final
errorFormatText String?
The message used when an input text isn't in a proper date format.
final
errorInvalidRangeText String?
The message used when the date range is invalid (e.g. start date is after end date).
final
errorInvalidText String?
The message used when an input text isn't a selectable date.
final
fieldEndHintText String?
The text used to prompt the user when no text has been entered in the end field.
final
fieldEndLabelText String?
The label for the end date text input field.
final
fieldStartHintText String?
The text used to prompt the user when no text has been entered in the start field.
final
fieldStartLabelText String?
The label for the start date text input field.
final
firstDate DateTime
The earliest allowable date on the date range.
final
hashCode int
The hash code for this object.
no setterinherited
helpText String?
The label displayed at the top of the dialog.
final
initialDateRange DateTimeRange?
The date range that the date range picker starts with when it opens.
final
initialEntryMode DatePickerEntryMode
The initial date range picker entry mode.
final
isWeekMode bool
If true, user can only select weeks, not days in popup.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lastDate DateTime
The latest allowable date on the date range.
final
restorationId String?
Restoration ID to save and restore the state of the ZdsDateRangePickerDialog.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
saveText String?
The label on the save button for the fullscreen calendar mode.
final
shortDateFormat String?
This is complete date format that comes on picker header when dates selected are from two different year and it must contain year format.
final
shortMonthDayFormat String?
This is month format that comes on picker header when dates selected are from same year this format should not contain year.
final
startDayOfWeek int?
0 indexed where Sunday is 0 and Saturday is 6
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<ZdsDateRangePickerDialog>
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.
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
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) 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