fixedRotationAngle property
int
get
fixedRotationAngle
Implementation
int get fixedRotationAngle => _fixedRotationAngle;
set
fixedRotationAngle
(int v)
Implementation
set fixedRotationAngle(int v) {
//只支持 0,90,180, 270, 360
const support = [-270, -180, -90, 0, 90, 180, 270];
if (!support.contains(v)) {
print('不在支持的角度数据当中');
return;
}
var ret = v;
if (v <= -270) {
ret = 90;
} else if (v >= 270) {
ret = -90;
}
//实际最后结果只有 -180, -90, 0, 90, 180
_fixedRotationAngle = ret;
}