BoardDateTimeBuilder<T extends BoardDateTimeCommonResult> class

BoardDateTimeBuilder

Display the Date picker like a keyboard at the bottom of the page. Provide picker with text input and scrolling.

If the size exceeds the breakpoint, the calendar is displayed on the left side and the picker on the right side. if the size is smaller than the breakpoint, the default is to display the picker, and the display is switched between the calendar and the buttons. Only the picker can be selected while the keyboard is displayed, and the calendar can be selected only while the keyboard is not displayed.

Example:

final controller = BoardDateTimeController();

@override
Widget build(BuildContext context) {
  return BoardDateTimeBuilder(
    controller: controller,
    builder: (context, constraints) {
      return Scaffold(
        ...
      );
    },
    onChange: (val) => setState(() => date = val),
  );
}

void open() {
  controller.open(DateTimePickerType.date, DateTime.now());
}
Inheritance

Constructors

BoardDateTimeBuilder({Key? key, required DateTimeBuilderWidget builder, required BoardDateTimeController controller, void onChange(DateTime)?, void onResult(T)?, DateTimePickerType pickerType = DateTimePickerType.datetime, DateTime? initialDate, DateTime? minimumDate, DateTime? maximumDate, double breakpoint = 800, BoardDateTimeOptions? options, bool resizeBottom = true})
const

Properties

breakpoint double
Breakpoints for determining wide and standard. Default is 800.
final
builder → DateTimeBuilderWidget
DateTimeBuilder Builder
final
controller BoardDateTimeController
BoardDateTimeController for Datetime picker
final
hashCode int
The hash code for this object.
no setterinherited
initialDate DateTime?
Date of initial selection state.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maximumDate DateTime?
Maximum selectable dates
final
minimumDate DateTime?
Minimum selectable dates
final
onChange → (void Function(DateTime)?)
Callback when date is changed.
final
onResult → (void Function(T)?)
Callback to allow each value to be retrieved separately, rather than having the result of the change be of type DateTime
final
options BoardDateTimeOptions?
Class for defining options related to the UI used by BoardDateTimeBuilder
final
pickerType DateTimePickerType
Display picker type.
final
resizeBottom bool
Flag whether to resize the bottom of the specified Builder. If true, the picker is displayed under the builder in Column.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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