shake static method
Creates a transition builder for that animates text by shaking it horizontally or vertically.
direction
(optional): An Axis
value that controls the shaking direction.
Defaults to Axis.horizontal
, which shakes the widget back and forth horizontally.
You can also use Axis.vertical
to shake the widget up and down vertically.
distance
(optional): A double
value that determines
the maximum offset of the shaking movement. Defaults to 3.0
,
which creates a moderate shaking effect. Higher values will
result in more pronounced shaking.
Implementation
static AnimatedRepeatableBuilder shake({
Axis direction = Axis.horizontal,
double distance = 5,
}) {
return AnimatedRepeatable.shake(
direction: direction,
distance: distance,
);
}