title: Flutter dynamic tabbar rendering (async)
body: <p>I would like to render a tab bar dynamically from SQLite. with:</p>
  
  <p>In </p>
  
  <pre><code>void initState() {
  </code></pre>
  
  <p>I retrieve the necessary </p>
  
  <pre><code>Future&lt;List&lt;MyClass&gt;&gt; list
  </code></pre>
  
  <p>with</p>
  
  <pre><code> getAllMyClasses().then((onValue) {
         list=value;
       });
  </code></pre>
  
  <p>but this (the above code) returns later than the </p>
  
  <pre><code> @override   
   Widget build(BuildContext ctxt) {
       return new DefaultTabController(
  </code></pre>
  
  <p>code runs, so the tab controller does not know the number of tabs (length), the tabs of the TabBar and the widgets of the TabBarView.</p>
  
  <p>How to resolve this? How could I ensure the building rendering to wait for initstate (including the async <code>getAllMyClasses()</code>) function?</p>
  
  <p>Thank you!</p>