Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Can't override back button functionality because of persistent_bottom_nav_bar #459

Closed
utkarshshendge opened this issue Mar 22, 2021 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@utkarshshendge
Copy link
Contributor

utkarshshendge commented Mar 22, 2021

  • Issue Description: We can't call onWillPop for the children pages of PersistentBottomNavBar. And because of this we are not able to override back button functionality inside the app.

  • Issue Severity: Medium

  • Observed Behaviour: Not able to control the behaviour of back button

  • Expected Behaviour: We should be able to call onWillPop function so we can control the behaviour of back button.

  • Steps to reproduce issue: Implementing WillPopScope for the chideren pages of PersistentBottomNavBar
    ( Children pages are : NewsFeed, Groups,Events, Organizations, ProfilePage, ) won't call onWillPop .

  • Snapshots/Videos:

  • I implemented a different BottomNavigation bar and everything worked fine in that,But brings changes to UI.
    Here is the video for it.
    https://user-images.githubusercontent.com/57677520/111951124-3aa83200-8b09-11eb-91a9-30010e4e50e8.mp4

  • Video of PersistentBottomNavBar that we are using.
    https://user-images.githubusercontent.com/57677520/111951196-56abd380-8b09-11eb-9cf2-ad1a7672ec4b.mp4

  • Does this issue need immediate attention? No

  • Are you willing to work on this issue: Yes

  • Other information: Personally ,I don't see much value in using PersistentBottomNavBar. Apps like Instagram,WhatsApp
    do not persist the navigation bar pages .Also the UI doesn't Look good with PersistentBottomNavBar.
    I found out that there is already an issue regarding this behaviour of PersistentBottomNavBar , can be found
    here.
    Since UI refactoring is for GSoC , I don't know if its the right time to work on this.
    We can wait for the maintainer of PersistentBottomNavBar but it will take few days (Github activity of maintainer is less).

Since this is something which is related to both UI, inner-functionality of app, I'd appreciate hearing your opinion on this
@Sagar2366 Sir , @DeltaHarbinger Sir.

@github-actions github-actions bot added the unapproved Unapproved, needs to be triaged label Mar 22, 2021
@Sagar2366 Sagar2366 added bug Something isn't working help wanted and removed unapproved Unapproved, needs to be triaged labels Mar 23, 2021
@shauravshikhar
Copy link
Contributor

if @utkarshshendge u want any help plz let me know i will try to help u

@utkarshshendge
Copy link
Contributor Author

if @utkarshshendge u want any help plz let me know i will try to help u

Sure @shikharsaurav , Thanks!!

@CyberWake
Copy link
Contributor

Do we really need this on like the changes I observed not need changing the nav bar we just need to change the page pushing method arguments.

newsfeed.dart
To

pushNewScreenWithRouteSettings(context,
              screen: AddPost(), settings: RouteSettings(),withNavBar:false);

From

pushNewScreenWithRouteSettings(context,
              screen: AddPost(), settings: RouteSettings());

events.dart
To

pushNewScreen(
            context,
            withNavBar: false,
            screen: AddEvent(),
          );

From

pushNewScreen(
            context,
            withNavBar: true,
            screen: AddEvent(),
          );

Basically we just need to add the parameter withNavBar: false whenever a page is push from any tab and add also add handleAndroidBackButtonPress: true argument in the PersistentTabView this would help you get all the desired functionality.

@utkarshshendge
Copy link
Contributor Author

I will try to do the same in next PR.
I checked the docs of PersistentTabView the issue is fixed in new version.
Thanks @CyberWake !!

@utkarshshendge
Copy link
Contributor Author

PR #523 fixes this issue as well.
Maintainer of persistent_bottom_nav_bar has fixed the issue regrading Willpop scope.
Closing this issue.

Ayush0Chaudhary pushed a commit to Ayush0Chaudhary/talawa that referenced this issue Mar 29, 2023
* refactor: updated documentation

* refactor: updated point numbers INSTALLATION.md

* refactor: updated INSTALLATION.md

* refactor: minor changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants