SunnyFormField<T> constructor

SunnyFormField<T>({
  1. Key? key,
  2. String discriminator = "",
  3. required dynamic label,
  4. required dynamic attribute,
  5. dynamic placeholder,
  6. required bool isRequired,
  7. Producer<String>? onLabelTap,
  8. ValueChanged<String>? onLabelChange,
  9. InputDecoration? decoration,
  10. FieldConverter<T?>? converter,
  11. required SunnyFormFieldBuilder<T>? builder,
  12. bool? captureNestedPaths,
  13. bool? enabled = true,
  14. bool? isReadOnly = false,
  15. FocusNode? focusNode,
  16. AttributeAccepter<T?>? onReadOnlyTapped,
  17. T? initialValue,
  18. FormValueChanged<T?>? onChange,
  19. FormController? form,
  20. List<SunnyFormFieldValidator>? validators,
})

Implementation

SunnyFormField({
  Key? key,
  String discriminator = "",
  required this.label,
  required dynamic attribute,
  this.placeholder,
  required this.isRequired,
  this.onLabelTap,
  this.onLabelChange,
  this.decoration,
  this.converter,
  required this.builder,
  bool? captureNestedPaths,
  this.enabled = true,
  this.isReadOnly = false,
  this.focusNode,
  this.onReadOnlyTapped,
  this.initialValue,
  this.onChange,
  this.form,
  this.validators,
})  : captureNestedPaths = captureNestedPaths ?? true,
      attribute = JsonPath.of(attribute),
      super(key: key ?? Key("$discriminator-${attribute ?? 'unknown'}"));