DateRangePickerDialog class Null safety

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

Constructors

DateRangePickerDialog({Key? key, DateTimeRange? initialDateRange, required DateTime firstDate, required DateTime lastDate, 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})
A Material-style date range picker dialog.
const

Properties

cancelText String?
The label on the cancel button for the text input mode.
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.
nonVirtual">@nonVirtualread-onlyinherited
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
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 DateRangePickerDialog.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
saveText String?
The label on the save button for the fullscreen calendar mode.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<DateRangePickerDialog>
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.
protected">@protectedinherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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.
nonVirtual">@nonVirtualinherited