ensureBuild static method

Widget ensureBuild(
  1. BuildContext context,
  2. FailedResultBuilder? customBuilder,
  3. FailedResult result
)

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,
  FailedResultBuilder? customBuilder,
  FailedResult result,
) =>
    (customBuilder != null)
        ? customBuilder(context, result)
        : findBuilder(context)(context, result);