Hy guys, I'm kinda new to this thing but pls is there any way one could retain the state of a stateful widget instead of rebuilding the widget each time it is called
--Let's say I have a PageView as my home page and its children are all stateful widgets... and on page swipe I want it to build the child in the list once instead of rebuilding on each page-change
--Here's my code,
!!!
return PageView(
onPageChanged: (cardIndex) {},
scrollDirection: Axis.horizontal,
children: <Widget>[
ChatPage(),
UploadPage(),
NotifyPage(),
Settings()
]
);
...thanks