Skip to content

Conversation

@maheshj01
Copy link
Owner

Updates to icon are now reflected

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing using flutter test

If you need help, consider pinging the maintainer @maheshmnj

NavbarNotifier.length = widget.destinations.length;
for (int i = 0; i < NavbarNotifier.length; i++) {
final navbaritem = widget.destinations[i].navbarItem;
keys.add(GlobalKey<NavigatorState>());
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are no longer reinitializing keys on update. I am quite not sure if this will be a problem if the navbar Items change. e.g if the number of items increeases or decreases.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can update navbar items on demand? What is the reason for this feature may I ask?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assume an app that allows users to acces app content without login and when the user logs in the the profile tab is shown.

e.g consider the tabs

Without login: home, explore, search
after login: home, explore, search , Profile

@maheshj01 maheshj01 changed the title fix: issue #38 Propagate NavbarItem updates to NavigationBar Apr 21, 2024
@maheshj01 maheshj01 merged commit 27e6fa0 into main Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants