swing method
Wraps the widget with a swing animation.
Example:
Icon(Icons.notifications).swing();
Implementation
Widget swing({
Duration duration = const Duration(milliseconds: 1000),
double angle = 0.15,
Alignment alignment = Alignment.topCenter,
}) {
return _SwingWidget(
duration: duration,
angle: angle,
alignment: alignment,
child: this,
);
}