TimePickerCallback typedef
Callback for custom time picker implementations.
Allows users to provide their own time picker widget instead of using Flutter's default showTimePicker.
Parameters:
initialTime: The initially selected time
Returns:
- A Future that resolves to the selected TimeOfDay
- null if the user cancelled
Example implementation:
Future<TimeOfDay?> myTimePicker({
required TimeOfDay initialTime,
}) async {
return await showCustomTimePicker(
context: context,
initialTime: initialTime,
);
}
Implementation
typedef TimePickerCallback = Future<TimeOfDay?> Function({
required TimeOfDay initialTime,
});