slideOutHorizontally function

ExitTransition slideOutHorizontally({
  1. double targetOffsetX = 1.0,
  2. Curve curve = Curves.linear,
})

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 default
  • curve - 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);
}