I got this error message:
If you declare the onWillPop function, you will have to handle the back function functionality yourself as your onWillPop function will override the default function.
'package:persistent_bottom_nav_bar/persistent_tab_view.widget.dart':
Failed assertion: line 49 pos 16: 'handleAndroidBackButtonPress && onWillPop == null'
And also if we have to use onwillpop in different screen. How can we use.
I am using this in PersistentTabView :
onWillPop: (final context) async { await showDialog( context: context!, useSafeArea: true, builder: (final context) => Container( height: 50, width: 50, color: Colors.white, child: ElevatedButton( child: const Text("Close"), onPressed: () { Navigator.pop(context); }, ), ), ); return false; },
I got this error message: If you declare the onWillPop function, you will have to handle the back function functionality yourself as your onWillPop function will override the default function. 'package:persistent_bottom_nav_bar/persistent_tab_view.widget.dart': Failed assertion: line 49 pos 16: 'handleAndroidBackButtonPress && onWillPop == null'
And also if we have to use onwillpop in different screen. How can we use.