Hello,
It's no possible to return List<User>
and close the page in the Success_Clicked
method.
You could use a static helper class
to store the object so that external calls are made.
You could refer to the following code:
The helper class:
public static class UserHelper
{
public static List<User> users;
}
Success_Clicked method:
...
UserHelper.users = new List<User>();
UserHelper.users.Add(new User()
{
FirstName = "test",
LastName = "test"
});
Shell.Current.GoToAsync("..");
Then, you could change MyClass.Current.Signin()
to MyClass.UserHelper.users
to call it.
Best Regards,
Alec Liu.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.