removeRoute method
- 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 Map<PointerRoute, Matrix4?> routes = _routeMap[pointer]!;
assert(routes.containsKey(route));
routes.remove(route);
if (routes.isEmpty) {
_routeMap.remove(pointer);
}
}