of<TSlot extends Object, TData> static method
Returns the nearest matching registry.
Implementation
static SlotRegistry<TSlot, TData> of<TSlot extends Object, TData>(
BuildContext context,
) {
final registry = maybeOf<TSlot, TData>(context);
assert(registry != null, 'No SlotScope<$TSlot, $TData> found in tree.');
return registry!;
}