'Flutter tab views build method runs even after navigation
I have the following screens
Main Tabs Screen with multiple tabs.
one tab is for listing products.
On listing product screen i use navigator push to open product detail screen
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) {
return ProductDetails(
chatItems: mitem,
currentUserId: widget.currrentUserId,
groupChatId: mitem.groupChatId,
);
},
),
);
on product detail screen and when setState is called
i can see that main tab screen build method is also running.
When i am navigated completey it should not run the build method
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
