ServicesBuilder class
Builds a list of PublicationService from a collection of service factories.
Provides helpers to manipulate the list of services of a Publication.
Constructors
- ServicesBuilder.create({ServiceFactory? contentProtection, ServiceFactory? cover, ServiceFactory? locator = _defaultLocator, ServiceFactory? positions})
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
serviceFactories
→ Map<
Type, ServiceFactory> -
final
Methods
-
build(
PublicationServiceContext context) → List< PublicationService> - Builds the actual list of publication services to use in a Publication.
-
decorate(
Type serviceType, ServiceFactory transform(ServiceFactory? )) → void -
Replaces the service factory associated with the given service type with the result of
transform
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
of<
T extends PublicationService> () → ServiceFactory? - Gets the publication service factory for the given service type.
-
remove(
Type serviceType) → void - Removes the service factory producing the given kind of service, if any.
-
set<
T> (ServiceFactory? factory) → void - Sets the publication service factory for the given service type.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited