PersianDatePicker constructor
const
PersianDatePicker({
- Key? key,
- double? widthWithPadding,
- required void onSubmitDate(
- Jalali selectedDate
- Jalali? chosenDate,
- TextStyle weekTitlesTextStyle = const TextStyle(fontSize: 16, color: Colors.grey),
- ButtonStyle headerButtonsStyle = const ButtonStyle(shape: MaterialStatePropertyAll(RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10))))),
- Widget headerPreviousButtonChild = const Text(Strings.previousMonth, style: TextStyle(fontSize: 14, color: Colors.white)),
- Widget headerNextButtonChild = const Text(Strings.nextMonth, style: TextStyle(fontSize: 14, color: Colors.white)),
- TextStyle headerMonthDisplayTextStyle = const TextStyle(fontSize: 18, color: Colors.black),
- Color? dateBackgroundColor,
- TextStyle dateTextStyle = const TextStyle(fontSize: 14, color: Colors.black),
- SelectedDateStyle? selectedDateStyle,
- required void onEmptyDateSubmit(),
- ButtonStyle submitButtonStyle = const ButtonStyle(shape: MaterialStatePropertyAll(RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10))))),
- Widget submitButtonChild = const Text(Strings.confirm, style: TextStyle(fontSize: 14, color: Colors.white)),
Implementation
const PersianDatePicker({
super.key,
this.widthWithPadding,
required this.onSubmitDate,
this.chosenDate,
this.weekTitlesTextStyle = const TextStyle(fontSize: 16, color: Colors.grey),
this.headerButtonsStyle = const ButtonStyle(
shape: MaterialStatePropertyAll(RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10)))),
),
this.headerPreviousButtonChild = const Text(
Strings.previousMonth,
style: TextStyle(fontSize: 14, color: Colors.white),
),
this.headerNextButtonChild = const Text(Strings.nextMonth, style: TextStyle(fontSize: 14, color: Colors.white)),
this.headerMonthDisplayTextStyle = const TextStyle(fontSize: 18, color: Colors.black),
this.dateBackgroundColor,
this.dateTextStyle = const TextStyle(fontSize: 14, color: Colors.black),
this.selectedDateStyle,
required this.onEmptyDateSubmit,
this.submitButtonStyle = const ButtonStyle(
shape: MaterialStatePropertyAll(RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10)))),
),
this.submitButtonChild = const Text(Strings.confirm, style: TextStyle(fontSize: 14, color: Colors.white)),
});