animateOnPageLoad method

Widget animateOnPageLoad(
  1. AnimationInfo animationInfo, {
  2. List<Effect>? effects,
})

Implementation

Widget animateOnPageLoad(
  AnimationInfo animationInfo, {
  List<Effect<dynamic>>? effects,
}) {
  animationInfo.maybeUpdateEffects(effects);
  return Animate(
    effects: animationInfo.effects,
    child: this,
    onPlay: (AnimationController controller) => animationInfo.loop
        ? controller.repeat(reverse: animationInfo.reverse)
        : null,
    onComplete: (AnimationController controller) =>
        !animationInfo.loop && animationInfo.reverse
        ? controller.reverse()
        : null,
  );
}