DateTimePicker class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- DateTimePicker
Constructors
-
DateTimePicker({Key? key, DateTime? initialSelectedDate, dynamic onDateChanged(DateTime date)?, dynamic onTimeChanged(DateTime time)?, DateTime? startDate, DateTime? endDate, DateTime? startTime, DateTime? endTime, Duration timeInterval = const Duration(minutes: 1), bool is24h = false, DateTimePickerType type = DateTimePickerType.Both, String timeOutOfRangeError = 'Out of Range', String datePickerTitle = 'Pick a Date', String timePickerTitle = 'Pick a Time', int numberOfWeeksToDisplay = 1, List<
String> ? customStringWeekdays, String? locale}) -
Constructs a DateTimePicker
const
Properties
- createNewViewModelOnInsert → bool
-
When set to true a new ViewModel will be constructed everytime the widget is inserted.
no setterinherited
-
customStringWeekdays
→ List<
String> ? -
final
- datePickerTitle → String
-
final
- disposeViewModel → bool
-
Indicates if you want Provider to dispose the ViewModel when it's removed from the widget tree.
no setterinherited
- endDate → DateTime?
-
final
- endTime → DateTime?
-
final
- fireOnViewModelReadyOnce → bool
-
Indicates if you want to fire onViewModelReady only once or everytime this widget is inserted into
the widget tree.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialiseSpecialViewModelsOnce → bool
-
Indicates if you want to only initialise the
FutureViewModel
orStreamViewModel
once or every time it's inserted into the widget tree.no setterinherited - initialSelectedDate → DateTime?
-
final
- is24h → bool
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- locale → String?
-
final
- numberOfWeeksToDisplay → int
-
final
- onDateChanged → (dynamic Function(DateTime date)?)
-
final
- onTimeChanged → (dynamic Function(DateTime time)?)
-
final
- reactive → bool
-
Indicates if the builder should be rebuilt when notifyListeners is called
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startDate → DateTime?
-
final
- startTime → DateTime?
-
final
- timeInterval → Duration
-
final
- timeOutOfRangeError → String
-
final
- timePickerTitle → String
-
final
- type → DateTimePickerType
-
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
inherited
-
builder(
BuildContext context, DateTimePickerViewModel viewModel, Widget? child) → Widget - A function that builds the UI to be shown from the ViewModel - Required
-
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
-
onDispose(
DateTimePickerViewModel viewModel) → void -
Fires when the ViewModel is disposed
inherited
-
onModelReady(
DateTimePickerViewModel viewModel) → void -
Fires when the ViewModel is first created or re-created
inherited
-
onViewModelReady(
DateTimePickerViewModel viewModel) → void - Fires when the ViewModel is first created or re-created
-
staticChildBuilder(
BuildContext context) → Widget? -
A Function that builds UI for the static child that builds only once
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
-
viewModelBuilder(
BuildContext context) → DateTimePickerViewModel - A builder that builds the ViewModel for this UI - Required
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited