MetaFormControl<M>.ofJsonPath constructor

MetaFormControl<M>.ofJsonPath({
  1. Key? widgetKey,
  2. required JsonPath path,
  3. bool checkAll = true,
  4. required SunnyFormFieldState<M?> fieldState,
  5. required MetaFormContext metaForm,
})

This doesn't allow embedding, just to ease on confusion. If you want an embedded field use the constructor below MetaFormControl.embedded

Implementation

MetaFormControl.ofJsonPath({
  Key? widgetKey,
  required JsonPath path,
  bool checkAll = true,
  required SunnyFormFieldState<M?> fieldState,
  required MetaFormContext metaForm,
}) : this._(
        widgetKey: widgetKey,
        basePath: JsonPath.Root,
        fieldPath: path,
        checkAll: checkAll,
        metaFormField: metaForm.path(JsonPath.Root, path),
        fieldState: fieldState,
      );