AnimatedSlide

This widget motivated by AnimatedSlide in Flutter.

Widget which automatically transitions the child’s offset relative to its normal position whenever the given offset changes.

The translation is expressed as an Offset scaled to the child’s size. For example, an Offset with a dx of 0.25 will result in a horizontal translation of one quarter the width of the child.

See: https://api.flutter.dev/flutter/widgets/AnimatedSlide-class.html

Props

offset

Value: Offset

duration

Value: number

curve

Value: Curve(default Curves.linear)

child

Value: Widget | undefined

Examples

Basic