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

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -