TimePickerDialog constructor Null safety

const TimePickerDialog(
  1. {Key? key,
  2. required TimeOfDay initialTime,
  3. String? cancelText,
  4. String? confirmText,
  5. String? helpText,
  6. String? errorInvalidText,
  7. String? hourLabelText,
  8. String? minuteLabelText,
  9. String? restorationId,
  10. TimePickerEntryMode initialEntryMode = TimePickerEntryMode.dial,
  11. EntryModeChangeCallback? onEntryModeChanged}
)

Creates a Material Design time picker.

initialTime must not be null.

Implementation

const TimePickerDialog({
  super.key,
  required this.initialTime,
  this.cancelText,
  this.confirmText,
  this.helpText,
  this.errorInvalidText,
  this.hourLabelText,
  this.minuteLabelText,
  this.restorationId,
  this.initialEntryMode = TimePickerEntryMode.dial,
  this.onEntryModeChanged,
}) : assert(initialTime != null);