PersianDatePicker constructor

const PersianDatePicker({
  1. Key? key,
  2. double? widthWithPadding,
  3. required void onSubmitDate(
    1. Jalali selectedDate
    ),
  4. Jalali? chosenDate,
  5. TextStyle weekTitlesTextStyle = const TextStyle(fontSize: 16, color: Colors.grey),
  6. ButtonStyle headerButtonsStyle = const ButtonStyle(shape: MaterialStatePropertyAll(RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10))))),
  7. Widget headerPreviousButtonChild = const Text(Strings.previousMonth, style: TextStyle(fontSize: 14, color: Colors.white)),
  8. Widget headerNextButtonChild = const Text(Strings.nextMonth, style: TextStyle(fontSize: 14, color: Colors.white)),
  9. TextStyle headerMonthDisplayTextStyle = const TextStyle(fontSize: 18, color: Colors.black),
  10. Color? dateBackgroundColor,
  11. TextStyle dateTextStyle = const TextStyle(fontSize: 14, color: Colors.black),
  12. SelectedDateStyle? selectedDateStyle,
  13. required void onEmptyDateSubmit(),
  14. ButtonStyle submitButtonStyle = const ButtonStyle(shape: MaterialStatePropertyAll(RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10))))),
  15. 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)),
});