UseCaseParentBuilder typedef Getting Started File Structure Writing Use Cases Structure

UseCaseParentBuilder = void Function(UseCaseComposer c)

A function too manipulate the UseCaseComposer like it would be done at the beginning of a UseCaseBuilder definition.

This builder can be added to a WerkbankRoot, WerkbankFolder or WerkbankComponent to do things with the UseCaseComposer before the UseCaseBuilder of a WerkbankUseCase is called.

Since in typical use, the UseCaseParentBuilders on WerkbankFolders and WerkbankComponents are much smaller than UseCaseBuilder definitions, it is fine to simply add them as a callback.

WerkbankFolder(
  name: 'Example Folder',
  builder: (c) {
    // Do something with the composer here.
  }
)

But if the builder gets too large, it is recommended to define it as a top level function, similar to a UseCaseBuilder.

Like with the UseCaseBuilder, the available features depend on which Addons are used. See UseCaseBuilder for more information.

Implementation

typedef UseCaseParentBuilder = void Function(UseCaseComposer c);