rotate method

Widget rotate(
  1. double angle, {
  2. Offset origin = Offset.zero,
  3. AlignmentGeometry alignment = Alignment.center,
  4. double? from,
})

Applies a RotationEffect to a Widget.

alignment is the alignment of the origin, relative to the size of the Widget.

origin is the origin of the rotation. This allows to translate the origin of the rotation to a different point.

Implementation

Widget rotate(
  double angle, {
  Offset origin = Offset.zero,
  AlignmentGeometry alignment = Alignment.center,
  double? from,
}) {
  return EffectWidget(
    start: from == null ? null : RotationEffect(angle: from),
    end: RotationEffect(
      angle: angle,
      origin: origin,
      alignment: alignment,
    ),
    child: this,
  );
}