Replace WillPopScope to PopScope
(cherry picked from commit 0c610bd08916fc91273994e1a961247432b58e75)
This commit is contained in:
@@ -34,11 +34,9 @@ class MobileContainerView extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
onCloseViewAction.call();
|
||||
return false;
|
||||
},
|
||||
return PopScope(
|
||||
onPopInvoked: (didPop) => !didPop ? onCloseViewAction : null,
|
||||
canPop: false,
|
||||
child: GestureDetector(
|
||||
onTap: onClearFocusAction,
|
||||
child: Scaffold(
|
||||
|
||||
@@ -31,11 +31,9 @@ class TabletContainerView extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
onCloseViewAction.call();
|
||||
return false;
|
||||
},
|
||||
return PopScope(
|
||||
onPopInvoked: (didPop) => !didPop ? onCloseViewAction : null,
|
||||
canPop: false,
|
||||
child: GestureDetector(
|
||||
onTap: onClearFocusAction,
|
||||
child: Scaffold(
|
||||
|
||||
Reference in New Issue
Block a user