addRoute method Null safety
- int pointer,
- PointerRoute route,
- [Matrix4? transform]
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, [Matrix4? transform]) {
final Map<PointerRoute, Matrix4?> routes = _routeMap.putIfAbsent(
pointer,
() => <PointerRoute, Matrix4?>{},
);
assert(!routes.containsKey(route));
routes[route] = transform;
}