MetaForm constructor
MetaForm({
- required String name,
- required FutureOr<
MetaFormContext> metaFormContext, - BuildContext? context,
- MSchemaRef? ref,
- Future<
Result> overrideHandler(- BuildContext context,
- FormController form,
- FormSubmitResult result
- MetaFormBuilderFn? builder,
- SubmitHook? submitHook,
- FormValidator? validator,
- bool inheritForm = false,
- FormController? parentForm,
- FormControllerCreator? formCreator,
- bool attachForm = true,
- bool? skipIfUnmodified,
- 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"));