route method

void route (PointerEvent event)

Calls the routes registered for this pointer event.

Routes are called in the order in which they were added to the PointerRouter object.

Implementation

void route(PointerEvent event) {
  final LinkedHashSet<PointerRoute> routes = _routeMap[event.pointer];
  final List<PointerRoute> globalRoutes = List<PointerRoute>.from(_globalRoutes);
  if (routes != null) {
    for (PointerRoute route in List<PointerRoute>.from(routes)) {
      if (routes.contains(route))
        _dispatch(event, route);
    }
  }
  for (PointerRoute route in globalRoutes) {
    if (_globalRoutes.contains(route))
      _dispatch(event, route);
  }
}