I have a StatelessWidget widget for my tabBar which contains 2 statefulWidgets. The thing is that when clicking on manager to watch all my tabs(landing on my first tab as default) the tab1 widget builder keeps being called.
I have already tried this 2 approaches but they did not work:
Multi tab / page view in flutter
Flutter Switching to Tab Reloads Widgets and runs FutureBuilder
It's really annoying because in some widgets I need to make some http requests and they also kept being called as well.
body: TabBarView(
children: <Widget>[
Tab1Page(),
Tab2Page(),
here'smy tab1 page, which is a stateFulWidget
Widget build(BuildContext context) {
// TODO: implement build
print("tab1: Builder");
return ScopedModelDescendant<MainModel>(
builder: (BuildContext context, Widget child, MainModel model) {
List<SolicitudDto> listadoSolicitudesAprobadas =
model.obtenerSolicitudesPendientes();
return Scaffold(
body: ListView(
children: <Widget>[
_buildCards(context, listadoSolicitudesAprobadas)
],
),
);
},
);
}
This is a print capture of my debugger: