mitesh77 / Best-Flutter-UI-Templates

completely free for everyone. Its build-in Flutter Dart.
Other
20.2k stars 4.51k forks source link

Bottom navigation vanishes. #44

Closed ghoshnilotpal8 closed 3 years ago

ghoshnilotpal8 commented 4 years ago

Hey, I added an extra screen to the fitness App, I added it at the bottom navigation at extreme right where the profile icon is, when I tap on the button the page translates to a different page but the bottom navigation vanishes. Any help would be appreciated, and there is no error displaying too.

qqjay2017 commented 4 years ago

find file /best_flutter_ui_templates/lib/fitness_app/fitness_app_home_screen.dart find Widget bottomBar edit changeIndex method

...
else if(index == 3){
...
 tabBody =
                      YourScreenClass(animationController: animationController);
...
}
...
pulsepas commented 3 years ago

Thank you @mitesh77 for a great App template!

Anyone could help with Using this navigation bar?

I can switch screens by tapping navigation buttons, but how address changeIndex method from the screen controls itself? For example how to make a screen transition to TrainingScreen when taping Meal Card in the MyDiarySceen? @qqjay2017 Скриншот 19-03-2021 152956

fg2q1q3q commented 3 years ago

Thank you @mitesh77 for a great App template!

Anyone could help with Using this navigation bar?

I can switch screens by tapping navigation buttons, but how address changeIndex method from the screen controls itself? For example how to make a screen transition to TrainingScreen when taping Meal Card in the MyDiarySceen? @qqjay2017 Скриншот 19-03-2021 152956

I think you need code like this

------------fitness_app_home_screen.dart-------------

void goNavidationIndex(int index){
     tabIconsList.forEach((TabIconData tab) {
         tab.isSelected = false;
     });
     tabIconsList[index].isSelected = true;
     changeIndex(index);//Need to extract the changeIndex method 
}

Then you need to pass the method as a parameter to the click event of the child page

pulsepas commented 3 years ago

Thanks @fg2q1q3q !

Could you provide more information on how to pass the method as a parameter to the widget? I have lost in documentation, nothing works for me.

fg2q1q3q commented 3 years ago

Thanks @fg2q1q3q !

Could you provide more information on how to pass the method as a parameter to the widget? I have lost in documentation, nothing works for me.

The code is here

pulsepas commented 3 years ago

Thanks @fg2q1q3q ! Could you provide more information on how to pass the method as a parameter to the widget? I have lost in documentation, nothing works for me.

The code is here

Hey! You saved my flutter project! I really appreciate your help! I want to buy you a coffee :)

fg2q1q3q commented 3 years ago

@pulsepas I'm glad to be able to help you. It's not worth mentioning