getQuarterTurns method
Returns the number of clockwise quarter turns the orientation is rotated
Implementation
int getQuarterTurns() {
Map<NativeDeviceOrientation, int> turns = {
NativeDeviceOrientation.unknown: 0,
NativeDeviceOrientation.portraitUp: 0,
NativeDeviceOrientation.landscapeRight: 1,
NativeDeviceOrientation.portraitDown: 2,
NativeDeviceOrientation.landscapeLeft: 3,
};
return turns[this]!;
}