createAnimation method Null safety

  1. @override
Animation<double> createAnimation()

Called to create the animation that exposes the current progress of the transition controlled by the animation controller created by createAnimationController().


Animation<double> createAnimation() {
  assert(_animation == null);
  _animation = CurvedAnimation(
    parent: super.createAnimation(),

    // These curves were initially measured from native iOS horizontal page
    // route animations and seemed to be a good match here as well.
    curve: Curves.linearToEaseOut,
    reverseCurve: Curves.linearToEaseOut.flipped,
  _offsetTween = Tween<Offset>(
    begin: const Offset(0.0, 1.0),
  return _animation!;