previewRotation property
int
get
previewRotation
Clockwise rotation, in degrees, that the raw preview texture needs before it lines up with the app window. The sensor buffer arrives in the sensor's own orientation, which is a quarter turn off on most phones.
Implementation
int get previewRotation {
if (viewType != null) return 0;
final bool isFront = device?.isFront ?? mirrored;
return isFront ? (sensorOrientation + displayRotation) % 360 : (sensorOrientation - displayRotation + 360) % 360;
}