showTime12hPicker static method

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

Display time picker bottom sheet with AM/PM.

Implementation

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