show method

void show(
  1. ShadToast toast
)

Implementation

void show(ShadToast toast) {
  _timer?.cancel();
  _shown.value = true;
  _visibleToast.value = toast;
  _controller.forward(from: 0);
  final effectiveDuration = toast.duration ?? kDefaultToastDuration;
  _timer = Timer(effectiveDuration, hide);
}