slide method
Wraps the widget with a slide animation.
Example:
Text('Hello').slide(offset: Offset(0.5, 0));
Implementation
Widget slide({
Offset offset = Offset.zero,
Duration duration = const Duration(milliseconds: 300),
Curve curve = Curves.easeInOut,
}) {
return AnimatedSlide(
offset: offset,
duration: duration,
curve: curve,
child: this,
);
}