MetaForm constructor

MetaForm({
  1. required String name,
  2. required FutureOr<MetaFormContext> metaFormContext,
  3. BuildContext? context,
  4. MSchemaRef? ref,
  5. Future<Result> overrideHandler(
    1. BuildContext context,
    2. FormController form,
    3. FormSubmitResult result
    )?,
  6. MetaFormBuilderFn? builder,
  7. SubmitHook? submitHook,
  8. FormValidator? validator,
  9. bool inheritForm = false,
  10. FormController? parentForm,
  11. FormControllerCreator? formCreator,
  12. bool attachForm = true,
  13. bool? skipIfUnmodified,
  14. List<MetaFormSection> sections = const [],
})

Implementation

MetaForm({
  required this.name,
  required this.metaFormContext,
  BuildContext? context,
  MSchemaRef? ref,

  /// Intercepts the submit handler, in case this form should submit its value somewhere other
  /// than the standard data endpoint
  this.overrideHandler,
  this.builder,
  this.submitHook,
  this.validator,
  this.inheritForm = false,
  this.parentForm,
  this.formCreator,
  this.attachForm = true,
  this.skipIfUnmodified,
  this.sections = const [],
})  : ref = ref ?? metaFormContext.resolveOrNull()?.ref ?? illegalState("Must provide a non-future metaFormContext or a ref"),
      super(key: Key("meta-form-$name"));