UseCaseBuilder typedef Getting Started File Structure IDE Integration Writing Use Cases Structure

UseCaseBuilder = WidgetBuilder Function(UseCaseComposer c)

A builder function for a use case.

A UseCaseBuilder is typically created by defining a top level function as follows:

WidgetBuilder exampleUseCase(UseCaseComposer c) {
  // You can do many things with the composer here.
  return (context) {
    return ExampleWidget();
  };
}

The UseCaseComposer can be used for many useful things, such as adding knobs to the UI, adding metadata to a use case, and much more. However, which specific features are available depends on which Addons are used. See AddonConfig.new and the Addons introduced by it for more information on what can be done with the UseCaseComposer.

Implementation

typedef UseCaseBuilder = WidgetBuilder Function(UseCaseComposer c);