SlotRegistry<TSlot extends Object, TData> class final

Mutable in-process registry of typed slot contributions.

Registrations are resolved in ascending (order, registrationOrder, pluginId) order so output remains deterministic.

Constructors

SlotRegistry()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(void listener()) → void
Adds a synchronous listener invoked when registrations change.
clear() → void
Removes all contributions.
hasSlot(TSlot slot) bool
Returns whether the registry has any contributions for slot.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register({required String pluginId, required TSlot slot, required SlotWidgetBuilder<TData> builder, int order = 0}) → void Function()
Registers one contribution and returns a disposer that unregisters it.
registerPlugin(SlotPlugin<TSlot, TData> plugin) → void Function()
Registers every slot contribution from plugin.
removeListener(void listener()) → void
Removes a previously added listener.
resolve(TSlot slot) List<ResolvedSlotContribution<TSlot, TData>>
Resolves contributions for slot in deterministic order.
toString() String
A string representation of this object.
inherited
unregister({required String pluginId, required TSlot slot}) bool
Unregisters one contribution by pluginId + slot.
unregisterPlugin(String pluginId) bool
Unregisters every contribution owned by pluginId.

Operators

operator ==(Object other) bool
The equality operator.
inherited