ReactiveValueListenableBuilder<T> constructor

const ReactiveValueListenableBuilder<T>({
  1. Key? key,
  2. required ReactiveListenableWidgetBuilder<T> builder,
  3. String? formControlName,
  4. AbstractControl<T>? formControl,
  5. Widget? child,
})

Create an instance of a ReactiveValueListenableBuilder.

Must provide a forControlName or a formControl but not both at the same time.

The builder arguments must not be null.

The child is optional but is good practice to use if part of the widget subtree does not depend on the value of the FormControl that is bind with this widget.

Implementation

const ReactiveValueListenableBuilder({
  Key? key,
  required this.builder,
  this.formControlName,
  this.formControl,
  this.child,
})  : assert(
          (formControlName != null && formControl == null) ||
              (formControlName == null && formControl != null),
          'Must provide a formControlName or a formControl, but not both at the same time.'),
      super(key: key);