1

I'm trying to make my mobile app responsive to device rotation, and I'm starting by checking the current rotation of the screen with a print of MediaQuery.of(context).orientation in my build.

When my emulator is vertical it indicate that my orientation is in "portrait" :

enter image description here

And when I click on the button to rotate it to horizontal : enter image description here

  1. it doesn't rebuild
  2. when I relaunch from an horizontal rotation it still indicate me that the orientation (of MediaQuery.of(context).orientation) is in "portrait"

I would like that my app actually detect the rotation to start, if anyone knows how I will take it.

Thanks.

1 Answer 1

2

The Orientation of an Emulator is by default locked, so you should simply try if enabling rotation you application work as intended, in order to do so simply swipe down on the phone system bar and locate the orientation button

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.