Home > Net >  How do I get an error in the device Orientation?
How do I get an error in the device Orientation?

Time:10-27

I Know This's Very Basic, But I Do Not Know How To Do It enter image description here

enter image description here

CodePudding user response:

You defined your deviceOrientation variable inside the build method instead of inside the Widget itself. So, you can't access deviceOrientation variable from 'setPage' function. You should pass deviceOrientation value to function.

  • Related