AnimatedPositioned

This widget motivated by AnimatedPositioned in Flutter.

Only works if it’s the child of a Stack.

This widget is a good choice if the size of the child would end up changing as a result of this animation. If the size is intended to remain the same, with only the position changing over time, then consider SlideTransition instead. SlideTransition only triggers a repaint each frame of the animation, whereas AnimatedPositioned will trigger a relayout as well.

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

Props

width

Value: number | undefined

height

Value: number | undefined

top

Value: number | undefined

left

Value: number | undefined

Value: number | undefined

bottom

Value: number | undefined

duration

Value: number

curve

Value: Curve(default Curves.linear)

child

Value: Widget | undefined

Examples

Basic