showTime12hPicker static method
Future<DateTime?>
showTime12hPicker(
- BuildContext context, {
- bool showTitleActions = true,
- DateChangedCallback? onChanged,
- DateChangedCallback? onConfirm,
- DateCancelledCallback? onCancel,
- dynamic locale = LocaleType.en,
- DateTime? currentTime,
- DatePickerTheme? theme,
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,
}) 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: Time12hPickerModel(
currentTime: currentTime,
locale: locale,
),
),
);
}