Bienvenida e Introducción

1

¡Renovaremos este curso!

2

Desarrollando en Flutter

3

¿Qué es Flutter?

4

Dart y Flutter

5

Sintaxis de Dart

6

¡Renovaremos este curso!

7

Flutter para desarrolladores Android, iOS y Xamarin.forms

8

Flutter para desarrolladores React Native

9

¿Cómo luce una app construída en Flutter?

10

Primer reto

Creando mi entorno de desarrollo

11

¡Renovaremos este curso!

12

Requerimientos de Hardware y Software

13

Instalando Flutter en Android Studio y Visual Studio Code

14

Composición de un proyecto en Flutter

Interfaces en Flutter

15

¡Renovaremos este curso! Te quedan unos días para concluirlo.

16

Programación Declarativa en Flutter

17

Estructura de un programa en Flutter

18

Hola Mundo en Flutter

19

Widgets básicos

20

Widgets con estado y sin estado

21

Análisis de Interfaces de Usuario en Flutter

22

Definiendo los layouts de nuestra interfaz

23

Segundo reto

Widgets sin estado en Flutter

24

¡Renovaremos este curso! Te quedan unos días para concluirlo.

25

Flutter Widgets: Container, Text, Icon, Row

26

Flutter Widgets: Column

27

Recursos en Flutter: Tipografías y Google Fonts

28

Widget Image

29

Widget Apilando Textos

30

Widgets Decorados

31

Widget Imagen Decorada

32

Widget Listview

33

Widget Button, InkWell

34

Tercer reto

Widgets con estado en Flutter

35

¡Renovaremos este curso! Te quedan unos días para concluirlo.

36

Botones en Flutter

37

Clase StatefulWidget: Cómo se compone

38

Widget Floating Action Button

39

Widgets BottomNavigationBar

40

Generando Navegación en BottomNavigationBar

41

Personalizando nuestro BottomNavigation Bar a Cupertino iOS BottomBar

42

Cuarto reto

Fin del Curso

43

¡Renovaremos este curso!

44

Conclusiones

45

¡Terminamos!

You don't have access to this class

Keep learning! Join and start boosting your career

Aprovecha el precio especial y haz tu profesión a prueba de IA

Antes: $249

Currency
$209
Suscríbete

Termina en:

2 Días
14 Hrs
39 Min
41 Seg
Curso de Flutter

Curso de Flutter

Anahí Salgado Díaz de la Vega

Anahí Salgado Díaz de la Vega

Generando Navegación en BottomNavigationBar

40/45
Resources

To complete the operation of our BottomNavigationBar we will define the onTapTapped() method that will contain the logic for the navigation between the different views of our application in response to the interaction with the user, and that will be assigned to the onTap property.

To control the change of views we use precisely the mutability condition of the widget by modifying the indexTap variable with the setState() function, setting it to the value of the index that receives the onTapTapped() method as a parameter and that refers to the position of the BottomNavigationBarItem that was pressed. Assigning the value of this index to the currentIndex property will automatically change the view due to the reactive behavior of this type of stateful widgets.

Contributions 25

Questions 3

Sort by:

Want to see more contributions, questions and answers from the community?

en versiones nuevas de flutter (2020) se utiliza label en lugar de title y para ocultarlos debemos utilizar las propiedades marcas en la imagen, de esa manera los iconos se acomodan correctamente y no quedan mas arriba como si tuvieran texto abajo

Así va quedando: ¡Golden Boys BARBERSHOP!

Llegar a este punto y que todo valla segun lo planeado es muy emocionante.

Aún me hace falta hacerle cambios a la tipografía más que nada, pero ya me va gustando más

Sin querer ya tengo una noción de como hacer una app básica, sin duda me será de ayuda 😃

Han cambiado algunas cositas desde que se hizo el curso, gracias a todos los que siguen aportando agregué estos parametros en el widget BottomNavigationBar.

BottomNavigationBar(
  showSelectedLabels: false, // No mostrar Labels seleccionado
  showUnselectedLabels: false, // tampoco no seleccionado
  onTap: onTapTapped,
  currentIndex: indexTap,
  selectedItemColor: Colors.deepPurple, //para mostrar color
  unselectedItemColor: Colors.deepPurpleAccent, //para mostrar color
  )

Generando una lista de Widget se podría solucionar la cantidad de estrellas completas, medias o vacías que vimos en las clases anteriores, o hay una mejor manera para ello?

Si les sucede como a mi que Theme no está aplicando el color morado a los iconos del bottom navigation bar, pueden asignarles colores y comportamientos agregando estos parametros en el widget BottomNavigationBar.

BottomNavigationBar(
          onTap: onTapTapped,
          currentIndex: indexTap,
          selectedItemColor: Colors.deepPurple,
          unselectedItemColor: Colors.deepPurpleAccent,
)

Una pestaña en inglés es “tab”, pienso que el método quedaría mejor: onTabTapped o quizás mejor onTabSelected. Pareciera sin mucha importancia, pero nombrar bien los methods es una buena práctica de arquitectura, pensando en el trabajo en equipo.

Ayuda mi bottomNavigationBar sale así,

![](

pero mi codigo esta teoricamente bien:

 return Scaffold(
        body: widgetsChildren[index],
        bottomNavigationBar: Theme(
          data: Theme.of(context).copyWith(
            canvasColor: Colors.white,
            primaryColor: Colors.purple
          ),
          child: BottomNavigationBar(
            onTap: onTapTapped,
            currentIndex: index,
            items: [
              BottomNavigationBarItem(
                icon: Icon(Icons.home),
                title: Text("")
              ),
              BottomNavigationBarItem(
                  icon: Icon(Icons.search),
                  title: Text("")
              ),
              BottomNavigationBarItem(
                  icon: Icon(Icons.settings),
                  title: Text("")
              ),
              BottomNavigationBarItem(
                  icon: Icon(Icons.person),
                  title: Text("")
              )
            ],
          ),
        ),

Se ve tan genial tener ambos emuladores con las apps funcionandos hasta este paso! 🤩

Alguien sabe si hay algun repositorio en github donde este le proyecto?


.

.

tambien se puede trabajar asi

    final tabs = [
      HomeTrips(),
      SearchTrips(),
      ProfileTrips()
    ];
          return CupertinoTabView(
            builder: (BuildContext context) => tabs[index],
          );

Si no te funciona el cambio de pantalla, revisa que el orden de la función y la anotación @override.

int indexTap = 0;
final List<Widget> listWidgtes = [
  Home(),
  Search(),
  ProfileTrips()
];

void onTapTapped(int index) {
  setState(() {
    indexTap = index;
  });
}

@override
Widget build(BuildContext context) {
return Scaffold(

Hasta el momento todo bien, 😁

Por qué cuando se hace slide hacia abajo no se oculta la lista de arriba?

El mejor curso

excelente cursooo

Un excelente curso

Hola como estan , tengo el siguiente error cuando navego entre las pestañas del profile y search.

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following Container object was thrown building SearchTrips(dirty):
Container(bg: MaterialAccentColor(primary value: Color(0xffffd740)))

The relevant error-causing widget was:
SearchTrips file:///C:/Users/Lenovo/AndroidStudioProjects/platzi_trips_app/lib/platzi_trips.dart:23:7
When the exception was thrown, this was the stack:
#0 SearchTrips.build (package:platzi_trips_app/search_trips.dart:7:5)
#1 StatelessElement.build (package:flutter/src/widgets/framework.dart:4576:28)
#2 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4502:15)
#3 Element.rebuild (package:flutter/src/widgets/framework.dart:4218:5)
#4 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4481:5)

Para agregar mas de tres iconos

child: BottomNavigationBar(
            type: BottomNavigationBarType.fixed, //Cambiamos el tipo de la barra de navegación a fixed
            onTap: onTapTapped,
            currentIndex: indexTap,
              items: [
                BottomNavigationBarItem(
                    icon: Icon(Icons.home),
                    title: Text("")
                ),
                BottomNavigationBarItem(
                    icon: Icon(Icons.search),
                    title: Text("")
                ),
                BottomNavigationBarItem(
                    icon: Icon(Icons.place),
                    title: Text("")
                ),
                BottomNavigationBarItem(
                    icon: Icon(Icons.notifications),
                    title: Text("")
                ),
                BottomNavigationBarItem(
                    icon: Icon(Icons.person),
                    title: Text("")
                ),
              ])