Skip to content

Instantly share code, notes, and snippets.

@JoeM-RP
Created November 26, 2018 00:26
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
private async Task ShowAlert()
{
var response = await _dialogService.DisplayAlertAsync("Yikes!", "This is a fake error to demonstrate the alert", "Retry", "Cancel");
if (response)
{
// TODO: If response is true, the user wants to "retry" the action.
// Do something here to attempt the action again
}
else
{
// TODO: If response is false, the user has canceled the attempted action
// So perform an action here that makes sense; we may want to naviagte to
// a previous page or just sit idle
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment