title: Flutter: update TabController length dynamically
body: <pre><code>@override
  void initState() {
      _portfoliosTabController = TabController(
        vsync: this,
        length: Provider.of&lt;MyRents&gt;(context, listen: false).list.length,
      );
  }
  </code></pre>
  <p>That length changes dynamically depending on many factors and functions and it is given by <code>Provider</code>. How can I update it without moving it inside the <code>build()</code> (that creates other issues)</p>