PersistentBottomNavBar icon indicating copy to clipboard operation
PersistentBottomNavBar copied to clipboard

when using onwillpop, with handleAndroidBackButtonPress=false, it gives

Open hadiabdullan opened this issue 2 years ago • 3 comments

hadiabdullan avatar Nov 19 '22 07:11 hadiabdullan

type 'Future' is not a subtype of type '(() => Future)?' in type cast

hadiabdullan avatar Nov 19 '22 07:11 hadiabdullan

when using onwillpop, with handleAndroidBackButtonPress=false, it gives type 'Future' is not a subtype of type '(() => Future)?' in type cast

hadiabdullan avatar Nov 19 '22 07:11 hadiabdullan

Change the onWillPop to this:

onWillPop: !widget.handleAndroidBackButtonPress && widget.onWillPop != null ? () async { final result = await widget.onWillPop!(_contextList[_controller!.index]); return Future.value(result); }

AndreSait avatar Apr 26 '23 17:04 AndreSait