DialogTime constructor
const
DialogTime({})
Constructs a new DialogTime widget instance.
The onConfirm parameter is mandatory and defines the action taken upon user confirmation,
receiving the selected TimeOfDay. Optional parameters allow customization:
title: Sets the dialog header text; omits the title if null.initialTime: Pre-selects a time in the picker for quicker user input.confirmTextandcancelText: Customize button labels for localization or branding.use24HourFormat: Enables 24-hour time display, useful for international apps.showSeconds: Adds seconds to the picker for applications needing granular time control.
All optional parameters have sensible defaults to ensure immediate usability.
Implementation
const DialogTime({
super.key,
this.title,
required this.onConfirm,
this.showSeconds = false,
this.use24HourFormat = false,
this.confirmText = "Done",
this.cancelText = "Cancel",
this.initialTime,
});