immi420 / crystal_navigation_bar

crystal bottom navigation bar
Other
8 stars 1 forks source link

selectedIcon always set to home. #3

Closed hacker0id closed 10 months ago

hacker0id commented 10 months ago

In my code I refactored crystal_nav_bar to be able to use it app-wide (on all screens), when I click say profiles page and I have added navigator if _selectedTab == _SelectedTab.profile, it no doubt navigates me to the ProfilePage(), however it doesn't change the active icon to profile...

Attaching Screenshots :

Simulator Screenshot - iPhone 15 Pro - 2024-01-07 at 05 24 13 Simulator Screenshot - iPhone 15 Pro - 2024-01-07 at 05 24 18 Simulator Screenshot - iPhone 15 Pro - 2024-01-07 at 05 24 25

immi420 commented 10 months ago

Can you provide reproducable code? What i understand you are trying to change screens using navigator? You don't need to use navigator to change screens only index needs to be updated. You can check example or provide your code or explain your specific scenario.