title: landscape mode in one screen in flutter
body: <p>this is my code</p>
  <pre><code>  @override
    void initState() {
      SystemChrome.setPreferredOrientations([
        DeviceOrientation.portraitUp,
        DeviceOrientation.landscapeRight,
        DeviceOrientation.landscapeLeft,
      ]);
      super.initState();
  }
  
    @override
    dispose() {
      SystemChrome.setPreferredOrientations([
        DeviceOrientation.portraitUp,
      ]);
  
      super.dispose();
    }
  </code></pre>
  <p>the problem is when i push a route to do other things the &quot;dispose&quot; method of current screen doesn't execute which is expected ,and as a result the other screen can be in landscape too
  and if i add</p>
  <pre><code>    SystemChrome.setPreferredOrientations([
        DeviceOrientation.portraitUp,
      ]);
  </code></pre>
  <p>in the second screen that fix the problem but when i go back to my main screen it will be portrait only because the &quot;initState&quot; doesn't execute when you pop from second screen</p>