showCalendar function
Future
showCalendar(
- BuildContext context, {
- String title = "Choose Date & Time",
- DateTime? currentDate,
- CalHead? calHead,
- CalCell? calCell,
- TextConfig? textConfig,
- bool canSelectPastDate = false,
Implementation
Future<dynamic> showCalendar(
BuildContext context, {
String title = "Choose Date & Time",
DateTime? currentDate,
CalHead? calHead,
CalCell? calCell,
TextConfig? textConfig,
bool canSelectPastDate = false,
}) async {
return await showDialog(
context: context,
builder: (BuildContext context) {
DateTime initDate = (currentDate ??= DateTime.now());
return AlertDialog(
title: Text(title),
content: calWidget(initDate,
w: MediaQuery.of(context).size.width - 80,
calHead: calHead,
calCell: calCell,
textConfig: textConfig,
canSelectPastDate: canSelectPastDate),
insetPadding: const EdgeInsets.fromLTRB(10, 0, 10, 0),
);
});
}