title: Native Device Orientation issue in Flutter
body: <p>I'm working with Flutter and I'm using <a href="https://github.com/rmtmckenzie/flutter_native_device_orientation" rel="nofollow noreferrer">Native Device Orientation Plugin</a></p>
  
  <p>I'm trying to know the device orientation and manage my view based on that.</p>
  
  <p>That plugin works really well, but I found an issue when I'm in page <code>A</code> which has a <code>NativeDeviceOrientationReader</code> and go to page <code>B</code> which has another <code>NativeDeviceOrientationReader</code>.</p>
  
  <p>In this case, the page which is supposed to has a <code>NativeDeviceOrientation.landscapeLeft</code> will have <code>NativeDeviceOrientation.landscapeRight</code> even if I didn't change the orientation in the middle.</p>
  
  <blockquote>
    <p>Note: If I rotate the phone after changing the page, it begins to work properly.
    Also if I delete one of the <code>NativeDeviceOrientationReader's</code> it works ok too.</p>
  </blockquote>
  
  <p><em>I'm using this code:</em></p>
  
  <pre class="lang-dart prettyprint-override"><code>NativeDeviceOrientationReader(
      builder: (context) {
      NativeDeviceOrientation orientation = NativeDeviceOrientationReader.orientation(context);
      var quarterTurns = 0;
      if (orientation == NativeDeviceOrientation.landscapeLeft) {
            quarterTurns = 3;
       } else if (orientation == NativeDeviceOrientation.landscapeRight) {
            quarterTurns = 1;
       }
    }
  ),
  
  (...)
  </code></pre>
  
  <p>I don't know if somehow I have to close the reader or something.</p>
  
  <p>Thanks in advance !</p>
  
  <h1>-------------- EDIT 1 --------------</h1>
  
  <p>Actually I didn't fix the issue, but I could resolve my problem changing one <code>NativeOrientationReader</code> to flutter <code>OrientationBuilder</code>, because I realized I didn't need the current rotation, I only wanted to know if the phone is landscape or portrait.</p>
  
  <p>Thank you.</p>