PersistentBottomNavBar
PersistentBottomNavBar copied to clipboard
when using onwillpop, with handleAndroidBackButtonPress=false, it gives
type 'Future
when using onwillpop, with handleAndroidBackButtonPress=false, it gives type 'Future' is not a subtype of type '(() => Future)?' in type cast
Change the onWillPop to this:
onWillPop: !widget.handleAndroidBackButtonPress && widget.onWillPop != null ? () async { final result = await widget.onWillPop!(_contextList[_controller!.index]); return Future.value(result); }