swing static method

RotationTransition swing(
  1. Animation<double> animation,
  2. Widget child
)

摆动动画

Implementation

static RotationTransition swing(Animation<double> animation, Widget child) {
  return RotationTransition(
    turns: Tween<double>(begin: 0.0, end: 0.1).animate(
      CurvedAnimation(parent: animation, curve: Curves.elasticInOut),
    ),
    child: child,
  );
}