rotate method

Widget rotate({
  1. Key? key,
  2. required double angle,
  3. Offset? origin,
  4. AlignmentGeometry alignment = Alignment.center,
  5. bool transformHitTests = true,
  6. bool animate = false,
})

Implementation

Widget rotate({
  Key? key,
  required double angle,
  Offset? origin,
  AlignmentGeometry alignment = Alignment.center,
  bool transformHitTests = true,
  bool animate = false,
}) =>
    animate
        ? _StyledAnimatedBuilder(
            key: key,
            builder: (animation) {
              return _AnimatedTransform(
                child: this,
                transform: Matrix4.rotationZ(angle),
                alignment: alignment,
                origin: origin,
                transformHitTests: transformHitTests,
                duration: animation.duration,
                curve: animation.curve,
              );
            },
          )
        : Transform.rotate(
            key: key,
            child: this,
            angle: angle,
            alignment: alignment,
            origin: origin,
            transformHitTests: transformHitTests,
          );