StatefulBuilder({Key key, @required StatefulWidgetBuilder builder })

Creates a widget that both has state and delegates its build to a callback.

The builder argument must not be null.

Source

StatefulBuilder({
  Key key,
  @required this.builder
}) : super(key: key) {
  assert(builder != null);
}