animatedPositioned method
Animated version of Positioned which automatically transitions the child's position over a given duration whenever the given position changes.
Only works if it's the child of a Stack.
Implementation
Widget animatedPositioned({
required Duration duration,
Key? key,
double? left,
double? top,
double? right,
double? bottom,
double? width,
double? height,
Curve curve = Curves.linear,
VoidCallback? onEnd,
}) {
return AnimatedPositioned(
key: key,
left: left,
top: top,
right: right,
bottom: bottom,
width: width,
height: height,
curve: curve,
duration: duration,
onEnd: onEnd,
child: this,
);
}