Skip to content

Instantly share code, notes, and snippets.

@JoeM-RP
Created November 26, 2018 00:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoeM-RP/40048be9f7cef138a80371d28dc3c279 to your computer and use it in GitHub Desktop.
Save JoeM-RP/40048be9f7cef138a80371d28dc3c279 to your computer and use it in GitHub Desktop.
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