I Know This's Very Basic, But I Do Not Know How To Do It
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.