wobble static method

AnimatedBuilder wobble(
  1. Animation<double> animation,
  2. Widget child
)

Wobble 动画

Implementation

static AnimatedBuilder wobble(Animation<double> animation, Widget child) {
  return AnimatedBuilder(
    animation: animation,
    builder: (context, child) {
      final angle = animation.value * pi / 18;
      return Transform.rotate(angle: angle, child: child);
    },
    child: child,
  );
}