title: Unhandled Exception: Bad state: Future already completed in flutter
body: <p>hello I have this error when i navigate to another page in my app </p>
  
  <p>i don't know why this error show up </p>
  
  <pre><code>#0      _AsyncCompleter.complete  (dart:async/future_impl.dart:39:31)
  #1      Route.didComplete 
  package:flutter/…/widgets/navigator.dart:203
  #2      NavigatorState.pushReplacement.&lt;anonymous closure&gt; 
  package:flutter/…/widgets/navigator.dart:1861
  #3      TickerFuture.whenCompleteOrCancel.thunk 
  package:flutter/…/scheduler/ticker.dart:389
  #4      _rootRunUnary  (dart:async/zone.dart:1132:38)
  #5      _CustomZone.runUnary  (dart:async/zone.dart:1029:19)
  #6      _FutureListener.handleValue  (dart:async/future_impl.dart:137:18)
  #7      Future._propagateToListeners.handleValueCallback  (dart:async/future_impl.dart:678:45)
  #8      Future._propagateToListeners  (dart:async/future_impl.dart:707:32)
  #9      Future._completeWithValue  (dart:async/future_impl.dart:522:5)
  #10     Future._asyncComplete.&lt;anonymous closure&gt;  (dart:async/future_impl.dart:552:7)
  #11     _rootRun  (dart:async/zone.dart:1124:13)
  #12     &lt;…&gt; 
  </code></pre>
  
  <p>the Navigation code is </p>
  
  <pre><code>Navigator.pop(context);
  Navigator.pushReplacementNamed(context, '/NavigationBar');
  </code></pre>
  
  <p>and the routes is like this </p>
  
  <pre><code> routes: {
          "/": (BuildContext context) =&gt; LoginPage(),
          "/NavigationBar": (BuildContext context) =&gt; NavigationBarPage(),
  
        },
  
  </code></pre>