My flutter app only supports portrait mode.
However, on one screen user can take the pic using the camera plugin. Users can take the pic portrait mode or landscape mode(Without changing device orientation).
I want to display a rectangle overlay on top of the camera. So if I can detect the mobile is in landscape or portrait mode I can add x,y, height, width values according to the orientation.
I am not asking about the Orientation builder because my app only supports portrait mode.
I have read some articles about Gyrometer to detect the device orientation. But in flutter, I haven't found code examples.