SubsystemTypeDesc class
Descriptor for a subsystem type category (e.g. settings, navigation, telemetry).
Bridges subsystem classes with the registry that manages them and facilitates type-scoped lookups.
A shared package (e.g. a common notifications module) can depend on a
SubsystemTypeDesc instance ("there is a notifications service") without
knowing which SubsystemClassDesc each consuming app actually registers
behind it ("local notifications" vs "Firebase push"). This decouples the
shared package from any single app's concrete implementation — see
example/example.dart for a shared-type/multi-implementation walkthrough.
Constructors
-
SubsystemTypeDesc({required String displayName, required String description, required String serviceTypeId, bool supportsMultipleClasses = false, List<
SubsystemRequirement> requirements = const []})
Properties
-
allInstances
→ List<
Subsystem> -
Retrieves all instantiated subsystems of this type.
no setter
- description → String
-
final
- displayName → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isTypeContextDisposed → bool
-
Whether disposeTypeContext has been called and completed.
no setter
- isTypeContextInitialized → bool
-
Whether initializeTypeContext has been called and completed.
no setter
-
requirements
→ List<
SubsystemRequirement> -
Requirements and incompatibilities checked before the type is initialized.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serviceTypeId → String
-
Unique identifier of this service type category (e.g., 'core.settings').
final
- supportsMultipleClasses → bool
-
Whether multiple distinct subsystem classes can be registered under this type.
final
Methods
-
allInstancesOfType<
TSubsystem extends Subsystem> () → List< TSubsystem> -
Retrieves all instantiated subsystems of this type matching
TSubsystem. -
disposeTypeContext(
) → Future< void> - Lifecycle hook called when the last subsystem of this type is disposed. Managed by the registry; should not be called directly.
-
getInstanceByClassId<
TSubsystem extends Subsystem> (String classId) → TSubsystem -
Retrieves an instance of this type by its
classId. -
getRegistry(
) → SubsystemInstanceRegistryByTypeDesc - Retrieves the registry associated with this type.
-
initializeTypeContext(
) → Future< void> - Lifecycle hook called when the first subsystem of this type is registered. Managed by the registry; should not be called directly.
-
isValid(
) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited