Builder constructor Null safety

const Builder(
  1. {Key? key,
  2. required WidgetBuilder builder}
)

Creates a widget that delegates its build to a callback.

The builder argument must not be null.

Implementation

const Builder({
  super.key,
  required this.builder,
}) : assert(builder != null);