form method

Widget form()

Builds each Field contained inside the TemplateForm.

It then wraps all the fields inside an AutofillGroup for better autocompleting.

Implementation

Widget form() {
  final List<Widget> fieldWidgets = [
    for (Field field in model.fields)
      field.widgetBuilder(
        fieldContext: _fieldContexts[field.id]!
          ..updateWith(
            forceErrorDisplay: forceDisplayFieldsError,
          ),
      )
  ];

  return AutofillGroup(
    child: Column(
      children: fieldWidgets,
    ),
  );
}