The short answer is that just add currentIndex as one of the parameter inside your navBarSection . Inside home. dart , just pass the currentIndex of the page.
What is the alternative of setState in Flutter?
The short answer is that just add currentIndex as one of the parameter inside your navBarSection . Inside home. dart , just pass the currentIndex of the page.