CopyPastor

Detecting plagiarism made easy.

Score: 0.8917496183928658; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2024-10-28
by Kalpesh Khandla

Original Post

Original - Posted on 2017-08-28
by Rémi Rousselet



            
Present in both answers; Present only in the new answer; Present only in the old answer;

The answer is `WillPopScope`. It will prevent the page from being popped by the system. You'll still be able to use `Navigator.of(context).pop()`
Checkout below code snippet.
@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(), ), ), ), ); }
The answer is `WillPopScope`. It will prevent the page from being popped by the system. You'll still be able to use `Navigator.of(context).pop()`
@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(), ), ), ), ); }

        
Present in both answers; Present only in the new answer; Present only in the old answer;