void OnDismiss() { OnVisualStateChanged(() => { if (!isTimedOut) { Toast.Dismiss(); } }, vsDismissed); }
public void Toast(string text, bool longDuration = false) { if (!_toast?.Dismissed ?? false) { _toast.Dismiss(false); } _toast = new Toast(text) { Duration = TimeSpan.FromSeconds(longDuration ? 5 : 3) }; if (TabBarVisible()) { _toast.BottomMargin = 55; } _toast.Show(); _toast.DismissCallback = () => { _toast?.Dispose(); _toast = null; }; }
public void DismissToast() { Toast.Dismiss(); }