flutter - Variable number of tabs in TabController -


having trouble creating tabcontroller number of tabs varies based on input firebase (or datasource). in state, utilizes singletickerproviderstatemixin have following:

@override void initstate() {   super.initstate();   //...    _controller = new tabcontroller(vsync: this, length: tabs.length); } 

tabs list of objects use tab bar items , build widgets each of tabviews. however, i'm seeing odd behavior. first odd bit tapping tab triggers 3 events. correctly registers right tab index tapped, oddly registers original index , original index indexischanging gets set 0 (presumably because animation , change index has finished.

also noticing updating tabs in setstate doesn't force widget rebuild. constructive thoughts?

can provide bit more code ? there's nothing wrong tabcontroller.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -