FormBuilderDateTimePicker class
Constructors
-
FormBuilderDateTimePicker({@required String attribute, List<FormFieldValidator> validators: const [], bool readOnly: false, InputType inputType: InputType.both, EdgeInsets scrollPadding: const EdgeInsets.all(20.0), double cursorWidth: 2.0, bool enableInteractiveSelection: true, InputDecoration decoration: const InputDecoration(), Icon resetIcon: const Icon(Icons.close), TimeOfDay initialTime: const TimeOfDay(hour: 12, minute: 0), TextInputType keyboardType: TextInputType.text, TextAlign textAlign: TextAlign.start, bool autofocus: false, bool obscureText: false, bool autocorrect: true, int maxLines: 1, bool maxLengthEnforced: true, bool expands: false, bool autovalidate: false, DateTime initialValue, DateFormat format, DateTime firstDate, DateTime lastDate, ValueChanged<DateTime> onChanged, DateTime initialDate, FormFieldValidator<DateTime> validator, FormFieldSetter<DateTime> onSaved, ValueChanged<DateTime> onFieldSubmitted, DatePickerMode initialDatePickerMode, Locale locale, bool selectableDayPredicate(DateTime), TextDirection textDirection, TextEditingController controller, FocusNode focusNode, TextStyle style, bool enabled, int maxLength, List<TextInputFormatter> inputFormatters, ValueTransformer valueTransformer, TransitionBuilder builder, Future<TimeOfDay> timePicker(BuildContext context), Future<DateTime> datePicker(BuildContext context), bool showCursor, int minLines, TextInputAction textInputAction, VoidCallback onEditingComplete, InputCounterWidgetBuilder buildCounter, Radius cursorRadius, Color cursorColor, Brightness keyboardAppearance, TextCapitalization textCapitalization: TextCapitalization.none, StrutStyle strutStyle })
-
Properties
-
attribute
→ String
-
final
-
autocorrect
→ bool
-
final
-
autofocus
→ bool
-
Preset the widget's value.
final
-
autovalidate
→ bool
-
final
-
buildCounter
→ InputCounterWidgetBuilder
-
final
-
builder
→ TransitionBuilder
-
final
-
controller
→ TextEditingController
-
final
-
cursorColor
→ Color
-
final
-
cursorRadius
→ Radius
-
final
-
cursorWidth
→ double
-
final
-
datePicker
→ Future<DateTime> Function(BuildContext context)
-
Called when the date chooser dialog should be shown. In the future the
preferred way of using this widget will be to utilize the datePicker and
timePicker callback functions instead of adding their parameter list to
this widget.
final
-
decoration
→ InputDecoration
-
final
-
enabled
→ bool
-
final
-
enableInteractiveSelection
→ bool
-
final
-
expands
→ bool
-
final
-
firstDate
→ DateTime
-
The earliest choosable date. Defaults to 1900.
final
-
focusNode
→ FocusNode
-
final
-
format
→ DateFormat
-
Allow manual editing of the date/time. Defaults to true. If false, the
picker(s) will be shown every time the field gains focus.
For representing the date as a string e.g.
DateFormat("EEEE, MMMM d, yyyy 'at' h:mma")
(Sunday, June 3, 2018 at 9:24pm)
final
-
initialDate
→ DateTime
-
The date the calendar opens to when displayed. Defaults to the current date. [...]
@
Deprecated('This field will be removed in version 4.0.0. Selected date or Current date will be used on DatePicker calendar instead'), final
-
initialDatePickerMode
→ DatePickerMode
-
Corresponds to the
showDatePicker()
parameter. Defaults to
DatePickerMode.day
.
final
-
initialTime
→ TimeOfDay
-
The initial time prefilled in the picker dialog when it is shown. Defaults
to noon. Explicitly set this to
null
to use the current time.
@
Deprecated('This field will be removed in the next major version. Selected time or noon will be used on TimePicker instead'), final
-
initialValue
→ DateTime
-
final
-
inputFormatters
→ List<TextInputFormatter>
-
final
-
inputType
→ InputType
-
The date/time picker dialogs to show.
final
-
keyboardAppearance
→ Brightness
-
final
-
keyboardType
→ TextInputType
-
final
-
lastDate
→ DateTime
-
The latest choosable date. Defaults to 2100.
final
-
locale
→ Locale
-
Corresponds to the
showDatePicker()
parameter. [...]
final
-
maxLength
→ int
-
final
-
maxLengthEnforced
→ bool
-
final
-
maxLines
→ int
-
final
-
minLines
→ int
-
final
-
obscureText
→ bool
-
final
-
onChanged
→ ValueChanged<DateTime>
-
Called whenever the state's value changes, e.g. after picker value(s)
have been selected or when the field loses focus. To listen for all text
changes, use the controller and focusNode.
final
-
onEditingComplete
→ VoidCallback
-
final
-
onFieldSubmitted
→ ValueChanged<DateTime>
-
Called when an enclosing form is submitted. The value passed will be
null
if format fails to parse the text.
final
-
onSaved
→ FormFieldSetter<DateTime>
-
Called when an enclosing form is saved. The value passed will be
null
if format fails to parse the text.
final
-
readOnly
→ bool
-
final
-
resetIcon
→ Icon
-
If defined, the TextField decoration's
suffixIcon
will be
overridden to reset the input using the icon defined here.
Set this to null
to stop that behavior. Defaults to Icons.close
.
final
-
scrollPadding
→ EdgeInsets
-
final
-
selectableDayPredicate
→ bool Function(DateTime)
-
Corresponds to the
showDatePicker()
parameter.
final
-
showCursor
→ bool
-
final
-
strutStyle
→ StrutStyle
-
final
-
style
→ TextStyle
-
final
-
textAlign
→ TextAlign
-
final
-
textCapitalization
→ TextCapitalization
-
final
-
textDirection
→ TextDirection
-
Corresponds to the
showDatePicker()
parameter.
final
-
textInputAction
→ TextInputAction
-
final
-
timePicker
→ Future<TimeOfDay> Function(BuildContext context)
-
Called when the time chooser dialog should be shown. In the future the
preferred way of using this widget will be to utilize the datePicker and
timePicker callback functions instead of adding their parameter list to
this widget.
final
-
validator
→ FormFieldValidator<DateTime>
-
For validating the DateTime. The value passed will be
null
if
format fails to parse the text.
final
-
validators
→ List<FormFieldValidator>
-
final
-
valueTransformer
→ ValueTransformer
-
final
-
hashCode
→ int
-
The hash code for this object. [...]
read-only, inherited
-
key
→ Key
-
Controls how one widget replaces another widget in the tree. [...]
final, inherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
createState()
→ _FormBuilderDateTimePickerState
-
Creates the mutable state for this widget at a given location in the tree. [...]
-
createElement()
→ StatefulElement
-
Creates a
StatefulElement
to manage this widget's location in the tree. [...]
inherited
-
debugDescribeChildren()
→ List<DiagnosticsNode>
-
Returns a list of
DiagnosticsNode
objects describing this node's
children. [...]
@protected, inherited
-
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.debug })
→ String
-
Returns 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