PersistentBottomNavBarV2 icon indicating copy to clipboard operation
PersistentBottomNavBarV2 copied to clipboard

How to use another persistent widget like a mini player on top of the Persistent Nav Bar

Open mrripp3r opened this issue 2 years ago • 5 comments

Hi, I was using a "DIY" navigation bar that allowed me to use a mini player and show it across screens through the use of a stack inside the main body. Regardless of the tab bar view, I was able to see my mini player. Since moving to this new package because of some unique features, I haven't been able to implement my mini player using the same technique. How can I go about this? I would like to have my mini player appear everywhere the bottom nav bar does.

See image below

Persistent mini player

mrripp3r avatar Jun 21 '22 14:06 mrripp3r

What is the reason your method does not work with this package anymore? An alternative would be to put the mini player into your CustomNavBarWidget. So the mini player is treated like a part of the navBar. Would that work?

jb3rndt avatar Jun 21 '22 18:06 jb3rndt

jb3rndt

This is exactly what I want to do using this package. The implementation is still failing

mrripp3r avatar Jun 21 '22 19:06 mrripp3r

Why does it fail?

jb3rndt avatar Jun 22 '22 10:06 jb3rndt

Why does it fail?

It fails because in this package, the body which acts as a viewport seems to be pre-created under the "screens: " argument. I would be able to do what I want if this was a body instead as part of a scaffold where I would use a Stack to have my mini player below. I hope this makes sense. Have a look at the Mini Player package I'm using and see if there's something I might be missing... https://pub.dev/packages/miniplayer Thanks in advance.

mrripp3r avatar Jun 22 '22 12:06 mrripp3r

Ok I understand what you mean now. It would require some rework in the package because as of now, every screen spans the whole height of the phone screen - even behind the navbar (as long as you are not using PersistentBottomTabView.custom). So what would happen right now is that the miniplayer is behind the navbar. Do you know if the miniplayer allows to set some kind of bottom offset, so one could say that it should be shifted up by 60px?

jb3rndt avatar Jun 25 '22 11:06 jb3rndt

This should be possible with version 5.x.x of the package. Please open a new issue if you run into problems with that :)

jb3rndt avatar Sep 23 '23 19:09 jb3rndt