FormItemDateTimeField class

Inheritance
Implemented types

Constructors

FormItemDateTimeField({TextEditingController? controller, TextInputType keyboardType = TextInputType.text, int? maxLength, int maxLines = 1, int? minLines, Color? backgroundColor, String? hintText, String? labelText, String? counterText = "", bool dense = false, bool enabled = true, Widget? prefix, Widget? suffix, String? errorText, bool allowEmpty = false, bool readOnly = false, bool obscureText = false, FormFieldValidator<DateTime?>? validator, void onChanged(DateTime? value)?, void onEditingComplete()?, EdgeInsetsGeometry? contentPadding, FormItemDateTimeFieldPickerType type = FormItemDateTimeFieldPickerType.dateTime, DateTime? initialDateTime, String? format, Future<DateTime> onShowPicker(BuildContext context, DateTime dateTime)?, void onSaved(DateTime? value)?})
const

Properties

allowEmpty bool
final
backgroundColor Color?
final
contentPadding EdgeInsetsGeometry?
final
controller TextEditingController?
final
counterText String?
final
dense bool
final
enabled bool
final
errorText String?
final
format → DateFormat
no setter
hashCode int
The hash code for this object.
no setterinherited
hintText String?
final
initialDateTime DateTime?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardType TextInputType
final
labelText String?
final
maxLength int?
final
maxLines int
final
minLines int?
final
obscureText bool
final
onChanged → (void Function(DateTime? value)?)
final
onEditingComplete → (void Function()?)
final
onSaved → (void Function(DateTime? value)?)
final
onShowPicker Future<DateTime> Function(BuildContext, DateTime)
no setter
prefix Widget?
final
readOnly bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
suffix Widget?
final
type FormItemDateTimeFieldPickerType
final
validator FormFieldValidator<DateTime?>?
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
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}) 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

Static Methods

datePicker({DateTime? startDate, DateTime? currentDate, DateTime? endDate}) Future<DateTime> Function(BuildContext, DateTime)
Picker definition that selects only dates.
dateTimePicker({DateTime? startDate, DateTime? current, DateTime? endDate}) Future<DateTime> Function(BuildContext, DateTime)
Picker definition that selects the date and time.
formatDate(int millisecondsSinceEpoch, {String format = "yyyy/MM/dd(E)", String defaultValue = ""}) String
Calculate formatted date string from millisecondsSinceEpoch.
formatDateTime(int millisecondsSinceEpoch, {String format = "yyyy/MM/dd(E) HH:mm:ss", String defaultValue = ""}) String
Calculate formatted datetime string from millisecondsSinceEpoch.
formatTime(int millisecondsSinceEpoch, {String format = "HH:mm:ss", String defaultValue = ""}) String
Calculate formatted time string from millisecondsSinceEpoch.
timePicker({DateTime? currentTime}) Future<DateTime> Function(BuildContext, DateTime)
Definition of a picker to select time.
tryParseFromDate(String formattedString, {DateTime? defaultValue, String format = r"([0-9]+)/([0-9]+)/([0-9]+)"}) DateTime?
Converts a string with only date and time information to DateTime.
tryParseFromDateTime(String formattedString, {DateTime? defaultValue, String format = r"([0-9]+)/([0-9]+)/([0-9]+)(\([^\)]+\))? ([0-9]+):([0-9]+):([0-9]+)"}) DateTime?
Converts a string with only date and time information to DateTime.
value(int millisecondsSinceEpoch) DateTime
Calculate DateTime from millisecondsSinceEpoch.