public async Task CallAlertAsync(string title, string message, AlertAction confirmButton, AlertAction cancelButton) { var choice = await CurrentPage.DisplayAlert("Error", "Not able to navigate to destination page", confirmButton?.Text ?? "OK", cancelButton?.Text ?? "Cancel"); if (choice) { confirmButton?.ActionButton?.Invoke(); } else { cancelButton?.ActionButton?.Invoke(); } }
public async Task CallAlertAsync(string title, string message, AlertAction button) { await CurrentPage.DisplayAlert("Error", "Not able to navigate to destination page", button?.Text ?? "OK"); button?.ActionButton?.Invoke(); }