showIRTimePickerDialog function
Future<IRTimeModel?>
showIRTimePickerDialog({
- required BuildContext context,
- IRTimeModel? initialTime,
- String? title,
- bool visibleSecondsPicker = true,
- bool visibleNowButton = true,
- String? nowButtonText,
- String? confirmButtonText,
- showIRTimePickerDialog show a dialog with IRTimePickerResponsiveDialog widget.
Implementation
Future<IRTimeModel?> showIRTimePickerDialog(
{required BuildContext context,
IRTimeModel? initialTime,
String? title,
bool visibleSecondsPicker = true,
bool visibleNowButton = true,
String? nowButtonText,
String? confirmButtonText}) async {
IRTimeModel? time = await showDialog<IRTimeModel?>(
context: context,
builder: (BuildContext buildContext) => Scaffold(
backgroundColor: Colors.grey.withOpacity(0.4),
body: Center(
child: IRTimePickerResponsiveDialog(
initialTime: initialTime,
title: title ?? "انتخاب زمان",
visibleSecondsPicker: visibleSecondsPicker,
visibleNowButton: visibleNowButton,
nowButtonText: nowButtonText ?? "انتخاب اکنون",
confirmButtonText: confirmButtonText ?? "تایید",
),
),
),
);
return time;
}