Skip to content

How to write the syntax in global functions or execution code to navigate or redirect to the another screen. To call API, we used ensemble.invokeAPI just like what is the syntax for screen navigation? #76

Answered by kmahmood74
kmahmood74 asked this question in Q&A
Discussion options

You must be logged in to vote

It's navigateScreen. See example below -

 - Row:
      styles: { mainAxis: spaceAround }
      children:
        - Button:
            styles: { outline: true, padding: 20 }
            label: View all available widgets
            onTap:
              action: navigateScreen
              name: Home

You can see such examples at the bottom of every screen in the kitchen sink. When navigating to a different screen, you can pass parameters too. For an example, see the Hotel App at https://studio.ensembleui.com/app/88a4d904-86a5-4c8c-a8be-5d606660b545/screens

Example code below from the Hotel Home Screen - https://studio.ensembleui.com/app/88a4d904-86a5-4c8c-a8be-5d606660b545/screen/5670433c…

Replies: 2 comments 1 reply

Comment options

kmahmood74
Nov 4, 2022
Maintainer Author

You must be logged in to vote
1 reply
@gaurikalp
Comment options

Answer selected by kmahmood74
Comment options

kmahmood74
Nov 9, 2022
Maintainer Author

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants