I am newbie to flutter. I am trying to figure out on how to display error message returned from the server (REST) adjacent to the input elements.
As an example,
Let's say if there is a login screen and user enters credentials and clicks 'Login' button. The UI needs to move to flash screen till it gets response from the server. Once it receives the response from the server, it would redirect to different screens based on the response. In case of error it should display the login screen back with error information next to the input element. In case of success scenario, it needs to be redirected to a pre-defined home page.
Please let me know how to handle this scenario. I might be wrong in overall thinking, probably there would be a better way to handle things. Please explain.
Thanks and Regards
Sankaran