onInit method
Called immediately after the widget is allocated in memory. You might use this to initialize something for the controller.
Implementation
@override
void onInit() {
final clampedInitialDate = PickerPlusDateUtilsX.clampDateToRange(
max: maxDate,
min: minDate,
date: DateTime.now(),
);
displayedMonth = DateUtils.dateOnly(initialDate ?? clampedInitialDate).obs;
selectedDay = (selectedDate != null ? DateUtils.dateOnly(selectedDate!) : null).obs;
pageController = PageController(
initialPage: DateUtils.monthDelta(minDate, displayedMonth.value!),
);
super.onInit();
}