A ação PushView
abre uma nova tela na mesma pilha da tela atual.
A estrutura do PushView
é:
Atributo | Tipo | Obrigatório | Definição |
---|---|---|---|
route | Route | ✓ | Rota de navegação (endpoint ou componente que retorna a nova tela). |
navigationContext | NavigationContext | Contexto a ser salvo na tela destino. |
No exemplo abaixo, temos uma tela com um botão, que ao ser clicado, abre uma nova tela carregada a partir do endpoint especificado na ação PushView
.
Para testar, basta carregar a tela do código abaixo no frontend.
Screen(
child = Button(
text = "Click me!",
onPress = listOf(
Navigate.PushView(
Route.Local(
Screen(
child = Text("Hello second Screen")
)
)
)
)
)
)
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.