haptome / dot_navigation_bar

A bottom navigation bar that you can customize with the options you need, without any limits. You can also customize the appearance of the navigation bar with simple smooth animations, providing a nice and clean UI/UX.
https://github.com/haptome/dot_navigation_bar
MIT License
45 stars 17 forks source link

move on other page #9

Open tasaddaq-hussain opened 2 years ago

tasaddaq-hussain commented 2 years ago

can you tell me how i move my real screen when i click on icon..

MartinDewe commented 2 years ago

Create List for navigation pages and warp to the body with the index.

Example :

List Pages = [ HomePage(), History(), Profile(), ];

var tabindex = _SelectedTab.values.indexOf(_selectedTab);

body : Pages[ tabindex ]

parthiv0408 commented 6 months ago

Full App Controller

int currentIndex = 0;

 void onItemTapped(int index) {
    currentIndex = index;
    update();
  }

List screen = [
HomePage(),
History(),
Profile(),
];

Full App Screen

body: controller.screen.elementAt(controller.currentIndex),