registerPolicy<T> static method
Registers a policy filter for T. A change whose model fails the check
is not delivered — policy runs before delivery, not in the UI.
Implementation
static void registerPolicy<T>(bool Function(T model) canSee) {
_policies[T] = (Object? model) => model is T && canSee(model);
}