private async void OnNotificationReceived(object sender, NotificationEventArgs e) { NotificationType = e.NotificationType; Message = e.Message; Title = e.Title; Options = e.Options; var okButtonText = Options?.OkButtonText ?? "OK"; await SnackbarStack.PushAsync(Message, Title, GetSnackbarColor( e.NotificationType ), (options) => { options.CloseButtonIcon = IconName.Times; options.ActionButtonText = okButtonText; }); }
private async void OnNotificationReceived(object sender, NotificationEventArgs e) { if (e == null) { return; } var okButtonText = e.Options?.OkButtonText ?? "OK"; await SnackbarStack.PushAsync(e.Message, e.Title, GetSnackbarColor( e.NotificationType ), (options) => { options.CloseButtonIcon = IconName.Times; options.ActionButtonText = okButtonText; options.Multiline = e.Options.Multiline; if (e.Options.IntervalBeforeClose > 0) { options.IntervalBeforeClose = e.Options.IntervalBeforeClose; } }); }