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: TextSizes.bodyLarge, color: Colours.hint),
  6. ButtonStyle headerButtonsStyle = const ButtonStyle(backgroundColor: MaterialStatePropertyAll(Colours.primary), foregroundColor: MaterialStatePropertyAll(Colours.main), shape: MaterialStatePropertyAll(RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10))))),
  7. Widget headerPreviousButtonChild = const Text(Strings.previousMonth, style: TextStyle(fontSize: TextSizes.bodyMedium, color: Colours.main)),
  8. Widget headerNextButtonChild = const Text(Strings.nextMonth, style: TextStyle(fontSize: TextSizes.bodyMedium, color: Colours.main)),
  9. TextStyle headerMonthDisplayTextStyle = const TextStyle(fontSize: TextSizes.titleSmall, color: Colours.title),
  10. Color dateBackgroundColor = Colours.secondary,
  11. TextStyle dateTextStyle = const TextStyle(fontSize: TextSizes.bodyMedium, color: Colours.title),
  12. SelectedDateStyle selectedDateStyle = const SelectedDateStyle(visibility: SelectedDateVisibility.stroke, color: Colours.primary),
  13. required void onEmptyDateSubmit(),
  14. ButtonStyle submitButtonStyle = const ButtonStyle(backgroundColor: MaterialStatePropertyAll(Colours.primary), foregroundColor: MaterialStatePropertyAll(Colours.main), shape: MaterialStatePropertyAll(RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10))))),
  15. Widget submitButtonChild = const Text(Strings.confirm, style: TextStyle(fontSize: TextSizes.bodyMedium, color: Colours.main)),
})

Implementation

const PersianDatePicker({
  super.key,
  this.widthWithPadding,
  required this.onSubmitDate,
  this.chosenDate,
  this.weekTitlesTextStyle = const TextStyle(fontSize: TextSizes.bodyLarge, color: Colours.hint),
  this.headerButtonsStyle = const ButtonStyle(
    backgroundColor: MaterialStatePropertyAll(Colours.primary),
    foregroundColor: MaterialStatePropertyAll(Colours.main),
    shape: MaterialStatePropertyAll(RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10)))),
  ),
  this.headerPreviousButtonChild = const Text(
    Strings.previousMonth,
    style: TextStyle(fontSize: TextSizes.bodyMedium, color: Colours.main),
  ),
  this.headerNextButtonChild = const Text(
    Strings.nextMonth,
    style: TextStyle(fontSize: TextSizes.bodyMedium, color: Colours.main),
  ),
  this.headerMonthDisplayTextStyle = const TextStyle(fontSize: TextSizes.titleSmall, color: Colours.title),
  this.dateBackgroundColor = Colours.secondary,
  this.dateTextStyle = const TextStyle(fontSize: TextSizes.bodyMedium, color: Colours.title),
  this.selectedDateStyle = const SelectedDateStyle(visibility: SelectedDateVisibility.stroke, color: Colours.primary),
  required this.onEmptyDateSubmit,
  this.submitButtonStyle = const ButtonStyle(
    backgroundColor: MaterialStatePropertyAll(Colours.primary),
    foregroundColor: MaterialStatePropertyAll(Colours.main),
    shape: MaterialStatePropertyAll(RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10)))),
  ),
  this.submitButtonChild = const Text(
    Strings.confirm,
    style: TextStyle(fontSize: TextSizes.bodyMedium, color: Colours.main),
  ),
});