Issue: GroupsOverview (which uses Futurebuilder - code is very long and not displayed here) seems to keep rebuilding when clicking through other views (as well as 'subviews') in the app which leads to too many Algolia operations. I think it's an issue where the hole tree rebuilds but I've no idea about that. Thought about integrating e.g. Scope model.
I have a major issue where just my overall understanding as a Flutter-beginner ends. I have a class 'GroupsOverview' which (for every reload) shows groups based on my current location with live data from a web service (Algolia). It's a stateful widget since the current location is loaded via initState. The view is a tab within a tabview, which is, again stateful. Keepalive doesn't seem to work. So how can I manage that the stateful widget GroupsOverview only rebuilds, when I am viewing it (and not while I am clicking in other views within the app)?
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () => Future.value(false),
child: new Scaffold(
appBar: AppBar(
leading: Container(),
/*title: Text('Chat.Here', style: TextStyle(color: Colors.white),),
leading: Container(),
backgroundColor: Colors.orange[600],
*/
flexibleSpace: SafeArea(
child: new TabBar(indicatorWeight: 4.0,indicatorColor: Colors.white, controller: controller, tabs: <Tab>[
new Tab(
text: 'Gruppen',
icon: Icon(Icons.group),
),
new Tab(
text: 'Chats',
icon: Icon(Icons.chat_bubble),
),
new Tab(
text: 'Einstellungen',
icon: Icon(Icons.settings),
)
]))),
body: new TabBarView(controller: controller, children: <Widget>[
new first.GroupsOverview(),
new second.ChatsOverview(),
new third.Settings()
])),
);
}