animateTo method

Future<void> animateTo(
  1. LocalDate date,
  2. {Curve curve = Curves.easeInOut,
  3. Duration duration = const Duration(milliseconds: 200)}
)

Animates the given date into view.

The alignment of today inside the viewport depends on visibleRange.

Implementation

Future<void> animateTo(
  LocalDate date, {
  Curve curve = Curves.easeInOut,
  Duration duration = const Duration(milliseconds: 200),
}) async {
  await scrollControllers.animateTo(
    visibleRange.getTargetPageForFocusDate(date, firstDayOfWeek),
    curve: curve,
    duration: duration,
  );
}