New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error using more than 2 tabs with TabController and AutomaticKeepAliveClientMixin #18350
Comments
This can probably be marked as a duplicate of #11895 |
@override
Widget build(BuildContext context) {
return DefaultTabController(
length: 3, child: new Scaffold(
key: scaffoldKey, appBar: new AppBar(
title: new Text("Cases List"),
actions: <Widget>[new Container(margin: EdgeInsets.only(right: 30),child: new GestureDetector(child: new Icon(Icons.search),onTap: (){
showSearchInAppBar();
},),)],
backgroundColor: AppThemeColor,
leading: new GestureDetector(onTap: (){
Navigator.pop(context);
},child: new Icon(Icons.arrow_back),),
bottom: new TabBar(tabs: [
new Tab(text: "MY CASES"),
new Tab(text: "SHARED"),
new Tab(text: "EDUCATIONAL"),
]),
), body: TabBarView(children: [
getMyCasesTabWidget(),
getSharedTabWidget(),
getEducationalTabWidget(),
]),));
} this way worked for me |
I've tried almost everything I have researched and nothing seems to fix 100%. The only best workaround I discovered, instead of using tabs use a PageView. |
Is there any solution I got same exception when i try to move from 1st tab to 3rd tab etc |
same problem |
Hello, I'm using flutter in version 1.0.0 and I have two screens, one with 2 tabs and another with 4 tabs. A with 2 tabs works normally, but with 4 tabs it has the same error. Is there any solution to this problem? |
I have the same problem. Any update now? |
is there any other way to solve this? I've facing this issue for long time but can't find any genuine solution for this. if yes, then it'll be very helpful. |
Why was an unresolved issue terminated? |
Same here! |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Steps to Reproduce
Here's a sample app which demonstrates the problem, you can trigger the error by switching between the tabs. For example selecting the 3rd tab and then the 1st tab.
Logs
Thanks for your help! Hope it's actually a bug and not user error...
The text was updated successfully, but these errors were encountered: