showElevarmDatePickerDialog<T> function
Future<T?>
showElevarmDatePickerDialog<T>({
- required BuildContext context,
- ElevarmDatePickerMode mode = ElevarmDatePickerMode.single,
- DateTime? initialDisplayDate,
- DateTime? initialSelectedDate,
- DateTimeRange? initialSelectedRange,
- DateTime? minDate,
- DateTime? maxDate,
- String positiveButtonLabel = 'Apply',
- String negativeButtonLabel = 'Cancel',
- List<
String> weekNames = const ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sat', 'Su'],
Displays ElevarmDatePickerDialog.
Implementation
Future<T?> showElevarmDatePickerDialog<T>({
required BuildContext context,
ElevarmDatePickerMode mode = ElevarmDatePickerMode.single,
DateTime? initialDisplayDate,
DateTime? initialSelectedDate,
DateTimeRange? initialSelectedRange,
DateTime? minDate,
DateTime? maxDate,
String positiveButtonLabel = 'Apply',
String negativeButtonLabel = 'Cancel',
List<String> weekNames = const ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sat', 'Su'],
}) async {
return showDialog<T>(
barrierColor: const Color.fromRGBO(52, 64, 84, 0.7),
context: context,
builder: (context) {
return BackdropFilter(
filter: ImageFilter.blur(sigmaX: 8.0, sigmaY: 8.0),
child: ElevarmDatePickerDialog(
mode: mode,
initialDisplayDate: initialDisplayDate,
initialSelectedDate: initialSelectedDate,
initialSelectedRange: initialSelectedRange,
minDate: minDate,
maxDate: maxDate,
positiveButtonLabel: positiveButtonLabel,
negativeButtonLabel: negativeButtonLabel,
weekNames: weekNames,
),
);
},
);
}