animateToDate method
void
animateToDate(
- DateTime date, {
- dynamic duration = const Duration(milliseconds: 500),
- dynamic curve = Curves.linear,
This function will animate to any date that is passed as an argument In case a date is out of range nothing will happen
Implementation
void animateToDate(DateTime date,
{duration = const Duration(milliseconds: 500), curve = Curves.linear}) {
assert(
_monthTimelineState != null,
'MonthTimelineController is not attached to any DatePicker View.',
);
_monthTimelineState!._controller.animateTo(_calculateDateOffset(date),
duration: duration, curve: curve);
}