rotateX method

Widget rotateX({
  1. double angle = 0,
  2. Alignment basePoint = Alignment.center,
})

三维X轴旋转

angle 旋转角度, 使用角度 basePoint 旋转轴心点 返回应用了三维旋转的Widget

Implementation

Widget rotateX({double angle = 0, Alignment basePoint = Alignment.center}) {
  return Transform(
    transform: Matrix4.identity()..rotateX(angle * pi / 180),
    alignment: basePoint,
    child: this,
  );
}