title: Exception has occurred. Bad state: Future already completed in flutter listview and Video player
body: <p>I am getting a video url I have stored from my CloudFirestore DB and displaying network videos in a listView.buiilder().
  <a href="https://i.stack.imgur.com/68xeT.png" rel="noreferrer"><img src="https://i.stack.imgur.com/68xeT.png" alt="enter image description here"></a>
  when I set </p>
  
  <pre><code>autiInitialize = true
  </code></pre>
  
  <p>or try to initialize the video in any other way I get Error</p>
  
  <pre><code>Exception has occurred.
  Bad state: Future already completed
  </code></pre>
  
  <p>and</p>
  
  <pre><code>I/flutter ( 6187): ══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════
  I/flutter ( 6187): The following assertion was thrown while dispatching notifications for VideoPlayerController: 
  I/flutter ( 6187): setState() or markNeedsBuild() called during build.
  I/flutter ( 6187): This MaterialControls widget cannot be marked as needing to build because the framework is already
  I/flutter ( 6187): in the process of building widgets. A widget can be marked as needing to be built during the build
  I/flutter ( 6187): phase only if one of its ancestors is currently building. This exception is allowed because the
  I/flutter ( 6187): framework builds parent widgets before children, which means a dirty descendant will always be
  I/flutter ( 6187): built. Otherwise, the framework might not visit this widget during this build phase.
  I/flutter ( 6187): The widget on which setState() or markNeedsBuild() was called was:
  I/flutter ( 6187):   MaterialControls(state: _MaterialControlsState#47383)
  </code></pre>
  
  <p>part of my code</p>
  
  <pre><code>VideoPlayerController  retcontroller(String varainatVideo){
      if(playercontroller == null){
        playercontroller = VideoPlayerController.network(varainatVideo);
      }
      return playercontroller;
    }
  
  
     Chewie(
    retcontroller(${snapshotDocuments[index].data['videos']}),
   autoInitialize: true,
  cupertinoProgressColors: ChewieProgressColors(),
  showControls:false,
   ),
  </code></pre>