buildTextField method

Widget buildTextField(
  1. String key,
  2. Widget textField(
    1. GlobalKey<FormCraftTextFieldState> globalKey
    )
)

Builds a FormCraftTextField widget with the specified key and configuration.

If a field with the given key already exists, it returns the existing widget to avoid duplicates.

The key parameter is required and must be unique. The textField parameter is required and must be a function that returns a FormCraftTextField widget.

Returns the created or existing FormCraftTextField widget.

Implementation

Widget buildTextField(
  String key,
  Widget Function(
    GlobalKey<FormCraftTextFieldState> globalKey,
  ) textField,
) {
  return _fieldManager.buildTextField(key, textField);
}