Home > Back-end >  Flutter - How to remove the lagging while screen change (jerky transition)?
Flutter - How to remove the lagging while screen change (jerky transition)?

Time:01-07

enter image description here

This happens on a simple back press. The back button brings it back to the dashboard. Strangely, coming back to the dashboard from other screens doesn't cause this lag.

I am not sure what (part of) code to post here.

CodePudding user response:

this is happening because of your emulator is laggy not your appliction,

or you can disable the transition and check the app still lagging or not,

 Navigator.pushReplacement(
      context, 
      PageRouteBuilder(
        pageBuilder: (context, animation1, animation2) => Page1(),
        transitionDuration: Duration(seconds: 0),
    ),
);

use this code to disable navigator animation, if the app still lagging a bit, then thats your emulator's problem try clear the cache or memmory or upgrade your memory. or try reboot your emulator.

IMPORTENT : this lagging problem will fix after the release of this app so dont worry about that now,

try flutter run --release to release your app

  •  Tags:  
  • Related