animatedAligned method

Widget animatedAligned({
  1. required AlignmentGeometry alignment,
  2. required Duration duration,
  3. Key? key,
  4. double? heightFactor,
  5. double? widthFactor,
  6. Curve curve = Curves.linear,
  7. VoidCallback? onEnd,
})

Animated version of Align which automatically transitions the child's position over a given duration whenever the given alignment changes.

Implementation

Widget animatedAligned({
  required AlignmentGeometry alignment,
  required Duration duration,
  Key? key,
  double? heightFactor,
  double? widthFactor,
  Curve curve = Curves.linear,
  VoidCallback? onEnd,
}) {
  return AnimatedAlign(
    key: key,
    alignment: alignment,
    duration: duration,
    curve: curve,
    onEnd: onEnd,
    heightFactor: heightFactor,
    widthFactor: widthFactor,
    child: this,
  );
}