cancelSubscriptions method

FutureOr<List<Object>> cancelSubscriptions(
  1. T node
)

Cancels and removes all subscriptions registered for node.

Implementation

FutureOr<List<Object>> cancelSubscriptions(T node) {
  var l = _elementsSubscriptions?.remove(node);
  if (l == null || l.isEmpty) return [];

  var f = domGenerator.cancelEventSubscriptions(node, l);

  if (f is Future<bool>) {
    return f.then((value) => l);
  } else {
    return l;
  }
}