I notficed that my app will get laggy after once I navigate to completely different pages. Additionally, once I tried switching from one web page to a different many time backwards and forwards, the app will get laggy. Different apps can hadle fast and steady web page switches, how can do this?
That is the way in which I navigate between pages:
Future<Widget> buildChatPage() async {
return Future.microtask(() {
return ChatPage();
});
}
var web page = await buildChatPage();
await Navigator.of(context).pushAndRemoveUntil(
PageRouteBuilder(pageBuilder: (_, __, ___) =>
web page
), (Route<dynamic> route) => false
);
These are the lags I’m speaking about
demo
I wish to take away lags and make the navigation smoother