animateTo method

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

Animates the current page to the given date's page.

Contract

Throws AssertionError if date is not within [start, end].

Implementation

Future<void> animateTo(
  DateTime date, {
  Duration duration = const Duration(milliseconds: 200),
  Curve curve = Curves.ease,
}) {
  assert(debugCheckInclusiveDateRange(start, date, end));
  return _animateTo(_from(date), duration, curve);
}