ensureBuild static method

Widget ensureBuild(
  1. BuildContext context,
  2. WidgetBuilder? customBuilder
)

Build the UI for given state

If customBuilder is given, it is used. Otherwise findBuilder will be called with context to find the default builder.

Implementation

static Widget ensureBuild(
  BuildContext context,
  WidgetBuilder? customBuilder,
) =>
    (customBuilder != null)
        ? customBuilder(context)
        : findBuilder(context)(context);