animateToSelection method
void
animateToSelection({
- dynamic duration = const Duration(milliseconds: 500),
- dynamic curve = Curves.linear,
This function will animate the Timeline to the currently selected Date
Implementation
void animateToSelection(
{duration = const Duration(milliseconds: 500), curve = Curves.linear}) {
assert(
_monthTimelineState != null,
'YearTimelineController is not attached to any DatePicker View.',
);
// animate to the current date
_monthTimelineState!._controller.animateTo(
_calculateDateOffset(_monthTimelineState!._currentDate!),
duration: duration,
curve: curve);
}