The TabView() and TransSet() methods allow us to toggle between the various screens available in the app, as follows:
- The TabView method is called when the user toggles between the Transfer screen and the ViewTransactions screen through the navigation.
- It expects an input parameter with the value 1 for rendering the Transfer screen and 2 for rendering the ViewTransactions screen. It sets the value of the ViewFlag state variable.
- If the value of the input parameter is 2, indicating the ViewTransactions screen, it calls the TransSet method to set the screen, to show the customer's outgoing transactions by default.
- It also calls setTransactions(), to populate the trans array object with the customer's ...