No es necesario duplicar codigo y hacer if-else en el CustomAppBar.
Esto hace exactamente lo mismo:
@Composable
fun CustomAppBar(title: String = "", navigationIcon: ImageVector? = null, navigationAction: () -> Unit? = {}) {
TopAppBar(
title = { Text(text = title) },
navigationIcon =
navigationIcon?.let {
{
IconButton(onClick = { navigationAction() }) {
Icon(navigationIcon, contentDescription = null)
}
}
}
)
}
驴Quieres ver m谩s aportes, preguntas y respuestas de la comunidad? Crea una cuenta o inicia sesi贸n.