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'),
),
),
);
}
}