slideInFromRight method

Widget slideInFromRight({
  1. Duration duration = const Duration(milliseconds: 300),
  2. Duration delay = Duration.zero,
  3. Curve curve = Curves.easeOutCubic,
  4. double offset = 1.0,
})

Wraps the widget with a slide-in animation from the right.

Example:

Text('Hello').slideInFromRight();

Implementation

Widget slideInFromRight({
  Duration duration = const Duration(milliseconds: 300),
  Duration delay = Duration.zero,
  Curve curve = Curves.easeOutCubic,
  double offset = 1.0,
}) {
  return _SlideInWidget(
    duration: duration,
    delay: delay,
    curve: curve,
    beginOffset: Offset(offset, 0),
    child: this,
  );
}