Flutter – How to remove the lagging while screen change (jerky transition)?

Issue

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.

Solution

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

Answered By – mishalhaneef

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published