removeRoute method

void removeRoute (int pointer, PointerRoute route)

Removes a route from the routing table.

No longer call route when routing a PointerEvent corresponding to pointer. Requires that this route was previously added to the router.

Routes removed reentrantly within PointerRouter.route will take effect immediately.

Implementation

void removeRoute(int pointer, PointerRoute route) {
  assert(_routeMap.containsKey(pointer));
  final LinkedHashSet<PointerRoute> routes = _routeMap[pointer];
  assert(routes.contains(route));
  routes.remove(route);
  if (routes.isEmpty)
    _routeMap.remove(pointer);
}