FormFieldDef constructor

FormFieldDef({
  1. required String id,
  2. Widget? icon,
  3. FormTheme? theme,
  4. String? title,
  5. String? description,
  6. bool disabled = false,
  7. bool hideField = false,
  8. bool requestFocus = false,
  9. List<FormBuilderValidator>? validators,
  10. bool validateLive = false,
  11. dynamic onSubmit(
    1. FormResults results
    )?,
  12. dynamic onChange(
    1. FormResults results
    )?,
  13. Widget fieldLayout(
    1. BuildContext context,
    2. FormFieldDef fieldDetails,
    3. FieldColorScheme currentColors,
    4. List<FormBuilderError> errors,
    5. Widget renderedField,
    ) = fieldSimpleLayout,
  14. Widget fieldBackground(
    1. BuildContext context,
    2. FormFieldDef fieldDetails,
    3. FieldColorScheme currentColors,
    4. Widget renderedField,
    ) = fieldSimpleBackground,
})

Implementation

FormFieldDef({
  required this.id,
  this.icon,
  this.theme,
  this.title,
  this.description,
  this.disabled = false,
  this.hideField = false,
  this.requestFocus = false,
  this.validators,
  this.validateLive = false,
  this.onSubmit,
  this.onChange,
  //this.embeds = const [],
  this.fieldLayout = fieldSimpleLayout, // Default to the simple layout
  this.fieldBackground =
      fieldSimpleBackground, // Default to the simple (no) field background
});