InputField constructor

InputField({
  1. required String id,
  2. required FieldType fieldType,
  3. String? hintText,
  4. Widget? prefixIcon,
  5. dynamic initialValue,
  6. List<DropdownMenuItem<String>>? items,
  7. TextEditingController? controller,
  8. String? validator(
    1. String?
    )?,
  9. FocusNode? focusNode,
})

The model from which the FormField is generated, in relation to the fields received.

Implementation

InputField(
    {required this.id,
    required this.fieldType,
    this.hintText,
    this.prefixIcon,
    this.initialValue,
    this.items,
    this.controller,
    this.validator,
    this.focusNode})
    : assert((fieldType != FieldType.dropdown || items != null),
          'Dropdown type require items not null');