addRoute method

void addRoute (int pointer, PointerRoute route)

Adds a route to the routing table.

Whenever this object routes a PointerEvent corresponding to pointer, call route.

Routes added reentrantly within PointerRouter.route will take effect when routing the next event.

Implementation

void addRoute(int pointer, PointerRoute route) {
  final LinkedHashSet<PointerRoute> routes = _routeMap.putIfAbsent(pointer, () => LinkedHashSet<PointerRoute>());
  assert(!routes.contains(route));
  routes.add(route);
}