DateTimePickerUltraDialog constructor

DateTimePickerUltraDialog({
  1. Key? key,
  2. bool showDatePicker = true,
  3. bool showTimePicker = true,
  4. String title = 'Tap here to open Date Time dropdown',
  5. Widget? titleWidget,
  6. dynamic onChangeDate(
    1. DateTime
    )?,
  7. dynamic onChangeTime(
    1. DateTime
    )?,
  8. dynamic onPress(
    1. DateTime
    )?,
  9. Color iconColor = Colors.grey,
  10. Color color = Colors.orangeAccent,
  11. Color textColor = Colors.black,
  12. double borderRadius = 2,
  13. double textBoxwidth = 60,
  14. DateTime? selectedDate,
  15. TimeOfDay? initialTime,
})

Implementation

DateTimePickerUltraDialog({
  super.key,
  this.showDatePicker = true,
  this.showTimePicker = true,
  this.title = 'Tap here to open Date Time dropdown',
  this.titleWidget,
  this.onChangeDate,
  this.onChangeTime,
  this.onPress,
  this.iconColor = Colors.grey,
  this.color = Colors.orangeAccent,
  this.textColor = Colors.black,
  this.borderRadius = 2,
  this.textBoxwidth = 60,
  DateTime? selectedDate,
  TimeOfDay? initialTime,
})  : selectedDate = selectedDate ?? DateTime.now(),
      initialTime = initialTime ?? TimeOfDay.now() {
  // Set the default value for initialTime if it's not provided
  // This code executes in the constructor body
  // This approach ensures the object is fully initialized
}