Answers for "flutter disable android back button"

0

flutter disable android back button

@override
Widget build(BuildContext context) {
  return new WillPopScope(
    onWillPop: () async => false,
    child: new Scaffold(
      appBar: new AppBar(
        title: new Text("data"),
        leading: new IconButton(
          icon: new Icon(Icons.ac_unit),
          onPressed: () => Navigator.of(context).pop(),
        ),
      ),
    ),
  );
}
Posted by: Guest on February-03-2021

Code answers related to "flutter disable android back button"

Code answers related to "Dart"

Browse Popular Code Answers by Language