DateTimeField class

DateTimeField

Shows an _InputDropdown that'll trigger DateTimeField._selectDate whenever the user clicks on it ! The date picker is platform responsive (ios date picker style for ios, ...)

Inheritance

Constructors

DateTimeField({Key? key, required ValueChanged<DateTime>? onDateSelected, required DateTime? selectedDate, DatePickerMode? initialDatePickerMode = DatePickerMode.day, InputDecoration? decoration, bool? enabled = true, DateTimeFieldPickerMode mode = DateTimeFieldPickerMode.dateAndTime, DatePickerEntryMode initialEntryMode = DatePickerEntryMode.calendar, TextStyle? dateTextStyle, DateTime? initialDate, bool use24hFormat = false, DateTime? firstDate, DateTime? lastDate, DateFormat? dateFormat})
DateTimeField.time({Key? key, ValueChanged<DateTime>? onDateSelected, DateTime? selectedDate, InputDecoration? decoration, bool? enabled, DateTime? initialDate, TextStyle? dateTextStyle, bool use24hFormat = false, DatePickerEntryMode initialEntryMode = DatePickerEntryMode.calendar, DateTime? firstDate, DateTime? lastDate})

Properties

dateFormat → DateFormat
How to display the DateTime for the user (default is DateFormat.yMMMD)
final
dateTextStyle TextStyle?
TextStyle of the selected date inside the field.
final
decoration InputDecoration?
Custom InputDecoration for the InputDecorator widget
final
enabled bool?
Whether the field is usable. If false the user won't be able to select any date
final
firstDate DateTime
The first date that the user can select (default is 1900)
final
hashCode int
The hash code for this object.
no setterinherited
initialDate DateTime?
The date that will be selected by default in the calendar view.
final
initialDatePickerMode DatePickerMode?
Let you choose the DatePickerMode for the date picker! (default is DatePickerMode.day
final
initialEntryMode DatePickerEntryMode
The initial entry mode for the material date picker dialog
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lastDate DateTime
The last date that the user can select (default is 2100)
final
mode DateTimeFieldPickerMode
Whether to ask the user to pick only the date, the time or both.
final
onDateSelected ValueChanged<DateTime>?
Callback for whenever the user selects a DateTime
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedDate DateTime?
The current selected date to display inside the field
final
use24hFormat bool
Whether to use the 24Hr Format
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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}) 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