who-aditya-nawandar
who-aditya-nawandar

Reputation: 1344

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

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.

Upvotes: 0

Views: 1194

Answers (1)

mishalhaneef
mishalhaneef

Reputation: 852

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

Upvotes: 1

Related Questions