ReactiveFormBuilder constructor Null safety

const ReactiveFormBuilder(
  1. {Key? key,
  2. Widget? child,
  3. WillPopCallback? onWillPop,
  4. required ReactiveFormConsumerBuilder builder,
  5. required ReactiveFormBuilderCreator form}
)

Creates and instance of ReactiveFormBuilder.

The form and builder arguments must not be null.

Example:

class MyWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ReactiveFormBuilder(
      form: (context) => FormGroup({'name': FormControl<String>()}),
      builder: (context, form, child) {
        return ReactiveTextField(
          formControlName: 'name',
        );
      },
    );
  }
}

Implementation

const ReactiveFormBuilder({
  Key? key,
  this.child,
  this.onWillPop,
  required this.builder,
  required this.form,
}) : super(key: key);