PersistentBottomNavBar icon indicating copy to clipboard operation
PersistentBottomNavBar copied to clipboard

onWillPop is not working properly

Open ZuniShahid opened this issue 2 years ago • 3 comments

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.

ZuniShahid avatar Oct 01 '22 19:10 ZuniShahid

Same issue!

deremakif avatar Oct 03 '22 19:10 deremakif

same

Nedimko123 avatar Nov 07 '22 16:11 Nedimko123

same

NaarGes avatar Feb 13 '23 11:02 NaarGes