BilalShahid13 / PersistentBottomNavBar

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

onWillPop assert error for custom navbar #342

Open zhell opened 1 year ago

zhell commented 1 year ago

Hello,

I keep getting this error on a custom nav bar : ════════ Exception caught by widgets library ═══════════════════════════════════ If you declare the onWillPop function, you will have to handle the back function functionality yourself as your onWillPop function will override the defualt function. 'package:persistent_bottom_nav_bar/persistent_tab_view.widget.dart': persistent_tab_view.widget.dart:1 Failed assertion: line 107 pos 16: 'handleAndroidBackButtonPress && onWillPop != null'

It seems like you missed the assert correction for the "custom" widget constructor.

There is also a small typo on the assert message "default"

Edit : There are actually 2 PR created to fix this issue, #309 & #336, one of them need to be merged to fix this error