rafalbednarczuk / curved_navigation_bar

Animated Curved Navigation Bar in Flutter
BSD 2-Clause "Simplified" License
694 stars 242 forks source link

initial index shows wrong icon but the currect page #39

Closed SaliBhdr closed 5 years ago

SaliBhdr commented 5 years ago

On application start the initial index is showing the wrong icon. I set the initial index to 2 but it shows the icon from index 0

reckers commented 5 years ago

If this is still a problem, I'd check out gepd's comment here How to animate based on the swiping movements of the tabbarview?.

Mrcel97 commented 5 years ago

I've wrongly followed this documentation where the basic example imports in YAML file:

dependencies:
  curved_navigation_bar: ^0.1.2 #latest version

Then I've checked closed issues, specifically this one #13. Where it says the problem is solved since 30 Mar. After finding this package releases here I've decided to modify the import to the latest version (0.3.1) even still having the ^ before the version.

dependencies:
  curved_navigation_bar: ^0.3.1

This solved my middle icon (index = 1) display issue.

rafalbednarczuk commented 5 years ago

I'm not the author of this tutorial: https://flutterawesome.com/a-flutter-package-for-easy-implementation-of-curved-navigation-bar/ Always check the latest version of plugin and don't trust tutorials in 100% :)