dismiss method

void dismiss(
  1. Object id
)

Implementation

void dismiss(Object id) {
  final hadMatch = _toasts.any((toast) => toast.id == id);
  _toasts.removeWhere((toast) => toast.id == id);
  if (hadMatch) notifyListeners();
}