From 83566ce7a8ed70497d67bef736b0ab7e486bebe0 Mon Sep 17 00:00:00 2001 From: Deepak Rai <103811779+StrawHATDEEPAK@users.noreply.github.com> Date: Fri, 30 Jun 2023 02:27:32 +0530 Subject: [PATCH] Update persistent_tab_view.widget.dart Fixed OnWillPop Assert Error When Using Custom Persistent Tab View By Changing OnWillPop != null to OnWillPop == null To correct the condition which invoked the asset throw --- lib/persistent_tab_view.widget.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/persistent_tab_view.widget.dart b/lib/persistent_tab_view.widget.dart index e173c8b6..e9940e86 100644 --- a/lib/persistent_tab_view.widget.dart +++ b/lib/persistent_tab_view.widget.dart @@ -104,7 +104,7 @@ class PersistentTabView extends PersistentTabViewBase { this.screenTransitionAnimation = const ScreenTransitionAnimation(), }) : assert(itemCount == screens.length, "screens and items length should be same. If you are using the onPressed callback function of 'PersistentBottomNavBarItem', enter a dummy screen like Container() in its place in the screens"), - assert(handleAndroidBackButtonPress && onWillPop != null, + assert(handleAndroidBackButtonPress && onWillPop == null, "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."), super( key: key,