Issue
I am trying to use a tab bar controller , what is the right way to add it
Solution
Just declare the tabController globally inside your state class and initialise it inside init state as you did, then you can access it inside your build method.
late TabController tabController;
void initState(){
tabController=TabController(vsync:this,length:3);
}
now use accordingly tab controller inside build method.
Answered By - Feroz Khan

0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.