BuildServiceParameters class
Configuration parameters for building and registering a subsystem instance.
Use the fluent setter methods (setSynchronous, setCustomBuilder, etc.) to configure parameters after construction.
- Implementers
Constructors
-
BuildServiceParameters({required SubsystemClassDesc classDescription, Map<
String, Object?> ? context, FutureOr<bool> shouldAbortBuild(BuildServiceParameters params)?, bool isSynchronous = false, SubsystemBuilder<Subsystem> ? customBuilder}) -
BuildServiceParameters.fromClass(SubsystemClassDesc classDesc, {Map<
String, Object?> ? context}) -
factory
Properties
- classDescription → SubsystemClassDesc
-
Metadata descriptor for the subsystem class.
no setter
-
context
→ Map<
String, Object?> ? -
Arbitrary context for builders (env, config, DI container, etc.).
no setter
-
customBuilder
→ SubsystemBuilder<
Subsystem> ? -
Optional custom builder to instantiate the subsystem.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isSynchronous → bool
-
Whether this service initializes synchronously and should be registered first.
Synchronous services are initialized before async ones to ensure dependencies are available.
no setter
- isValid → bool
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
shouldAbortBuild
→ FutureOr<
bool> Function(BuildServiceParameters params)? -
Optional predicate: if returns true, construction and activation are skipped.
no setter
-
shouldBuild
→ Future<
bool> -
no setter
Methods
-
abortBuild(
) → BuildServiceParameters -
copy(
) → BuildServiceParameters -
copyWith(
{SubsystemClassDesc? classDescription, Map< String, Object?> ? context, FutureOr<bool> shouldAbortBuild(BuildServiceParameters params)?, bool? isSynchronous, SubsystemBuilder<Subsystem> ? customBuilder}) → BuildServiceParameters -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setContext(
Map< String, Object?> context) → BuildServiceParameters -
setContextValue(
String key, Object? value) → BuildServiceParameters -
setCustomBuilder(
SubsystemBuilder< Subsystem> builder) → BuildServiceParameters -
setShouldAbortBuild(
FutureOr< bool> predicate(BuildServiceParameters params)) → BuildServiceParameters -
setSynchronous(
bool value) → BuildServiceParameters -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited