heartBeat static method

ScaleTransition heartBeat(
  1. Animation<double> animation,
  2. Widget child
)

HeartBeat 动画

Implementation

static ScaleTransition heartBeat(Animation<double> animation, Widget child) {
  return ScaleTransition(
    scale: Tween<double>(begin: 1.0, end: 1.3).animate(
      CurvedAnimation(parent: animation, curve: Curves.elasticOut),
    ),
    child: child,
  );
}