BilalShahid13 / PersistentBottomNavBar

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

pushDynamicScreen returns error #334

Open adt2 opened 1 year ago

adt2 commented 1 year ago

Trying to use an iconbutton '+' to open a modal (full screen) view. I can open the modal view just fine from a regular button on screens without the PersistentNavBar, but when I try...

IconButton(
            onPressed: () {
              PersistentNavBarNavigator.pushDynamicScreen(context,
                  screen: PageName(), withNavBar: false);
            },

...I get an error: "_CastError (type 'PageName' is not a subtype of type 'Route' in type case)". I'm not sure if I'm doing something wrong or if this is a bug.