UseCaseComposer class abstract interface Writing Use Cases

A class of which an instance is passed to a UseCaseBuilder, allowing use cases to do all kinds of useful things with it.

Most of the functionality of the UseCaseComposer is defined in extension methods introduced by addons.

On a more technical level, this class manages a single composition of a use case and allows to influence the composition process.

The methods of this class can be used to add metadata to the use case, manage the TransientUseCaseStateEntrys of the use case and more.

Each time a use case is composed, a new instance of this class passed to the corresponding UseCaseBuilder. After the composition is done most of the information collected on the UseCaseComposer is transferred to a UseCaseComposition.

Available extensions

Properties

active bool
Whether the UseCaseComposer is active or not.
no setter
background BackgroundComposer

Available on UseCaseComposer, provided by the BackgroundComposerExtension extension

Provides a BackgroundComposer with methods to set the default background for the use case.
no setter
constraints ViewConstraintsComposer

Available on UseCaseComposer, provided by the ViewConstraintsComposerExtension extension

no setter
hashCode int
The hash code for this object.
no setterinherited
knobs KnobsComposer

Available on UseCaseComposer, provided by the KnobsComposerExtension extension

Returns a KnobsComposer with many methods to create knobs for the use case.
no setter
node WerkbankNode
The WerkbankNode for which its UseCaseBuilder or UseCaseParentBuilder is currently being executed using this UseCaseComposer.
no setter
overview OverviewComposer

Available on UseCaseComposer, provided by the OverviewComposerExtension extension

A getter which returns an OverviewComposer with several methods to control the presentation of use cases when they are displayed as a thumbnail in the overview.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
states StatesComposer

Available on UseCaseComposer, provided by the StatesComposerExtension extension

no setter
useCase WerkbankUseCase
The WerkbankUseCase which is currently being composed using this UseCaseComposer.
no setter

Methods

addLateExecutionCallback(VoidCallback callback) → void
Schedules a callback to be executed shortly before the composition is done and therefore after the WerkbankUseCase.builder has been executed.
addSearchCluster(SearchCluster searchCluster) → void

Available on UseCaseComposer, provided by the UseCaseComposerSearchExtension extension

description(String description, {DescriptionMergeStrategy mergeStrategy = DescriptionMergeStrategy.append, bool forUseCase = false}) → void

Available on UseCaseComposer, provided by the DescriptionComposerExtension extension

Adds a description to a use case, component, folder or the root. The descriptions of a use case and all its ancestors are displayed for a use case in the "INSPECT" tab.
getMetadata<T extends UseCaseMetadataEntry<T>>() → T?
Gets the current UseCaseMetadataEntry that has the given generic type T as its UseCaseMetadataEntry.type.
getTransientStateEntry<T extends TransientUseCaseStateEntry<T, TransientUseCaseStateSnapshot>>() → T
Gets the TransientUseCaseStateEntry that has the given generic type T as its TransientUseCaseStateEntry.type.
isAddonActive(String addonId) bool
Checks whether an addon with the given addonId is used in the current composition.
knobPreset(String name, VoidCallback setKnobs) → void

Available on UseCaseComposer, provided by the KnobsComposerExtension extension

Adds a knob preset with the given name.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setMetadata<T extends UseCaseMetadataEntry<T>>(T metadata) → void
Sets a UseCaseMetadataEntry.
tags(List<String> tags) → void

Available on UseCaseComposer, provided by the TagsComposerExtension extension

toString() String
A string representation of this object.
inherited
urls(List<String> urls) → void

Available on UseCaseComposer, provided by the UrlsComposerExtension extension

wrapUseCase(WrapperBuilder builder, {WrappingLayer layer = WrappingLayer.fitted}) → void

Available on UseCaseComposer, provided by the WrappingComposerExtension extension

Wraps the widget built inside the builder around use case.

Operators

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