slideOutHorizontally function
This slide out content horizontally, to the target x defined in terms of fractions of the transition's width. By default, the content will slide out to the right, and Curves.linear is used by default. The direction of the slide can be controlled by configuring the targetOffsetX. A positive value means sliding to the right, whereas a negative value would slide the content towards the left. params:
targetOffsetX
- the target x of the exit transition, 1f by defaultcurve
- the easing curve for this animation, Curves.linear by default
Implementation
ExitTransition slideOutHorizontally({
double targetOffsetX = 1.0,
Curve curve = Curves.linear,
}) {
return slideOut(targetOffset: Offset(targetOffsetX, 0.0), curve: curve);
}