showTimePicker method Null safety

Future<DateTime?> showTimePicker(
  1. BuildContext context,
  2. {bool showTitleActions = true,
  3. bool showSecondsColumn = true,
  4. DateChangedCallback? onChanged,
  5. DateChangedCallback? onConfirm,
  6. DateCancelledCallback? onCancel,
  7. dynamic locale = LocaleType.en,
  8. DateTime? currentTime,
  9. DatePickerTheme? theme}
)

Display time picker bottom sheet.

Implementation

static Future<DateTime?> showTimePicker(
  BuildContext context, {
  bool showTitleActions: true,
  bool showSecondsColumn: true,
  DateChangedCallback? onChanged,
  DateChangedCallback? onConfirm,
  DateCancelledCallback? onCancel,
  locale: LocaleType.en,
  DateTime? currentTime,
  DatePickerTheme? theme,
}) async {
  return await Navigator.push(
    context,
    _DatePickerRoute(
      showTitleActions: showTitleActions,
      onChanged: onChanged,
      onConfirm: onConfirm,
      onCancel: onCancel,
      locale: locale,
      theme: theme,
      barrierLabel:
          MaterialLocalizations.of(context).modalBarrierDismissLabel,
      pickerModel: TimePickerModel(
        currentTime: currentTime,
        locale: locale,
        showSecondsColumn: showSecondsColumn,
      ),
    ),
  );
}