BilalShahid13 / PersistentBottomNavBar

A highly customizable persistent bottom navigation bar for Flutter
BSD 3-Clause "New" or "Revised" License
507 stars 371 forks source link

onWillPop is not working properly #308

Open ZuniShahid opened 1 year ago

ZuniShahid commented 1 year ago

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.

deremakif commented 1 year ago

Same issue!

Nedimko123 commented 1 year ago

same

NaarGes commented 1 year ago

same