After successfully login the user redirected to the Home page but when the user clicks on the browser back button it easily redirected to the login screen. What should I do to disable backward redirection?
class SecondPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
/// Hope WillPopScope will do the job for you.
return WillPopScope(
onWillPop: () async => null,
child: Scaffold(
body: Center(
child: Text('asd'),
),
),
);
}
}