SunnyFormField<T> constructor
SunnyFormField<T> ({
- Key? key,
- String discriminator = "",
- required dynamic label,
- required dynamic attribute,
- dynamic placeholder,
- required bool isRequired,
- Producer<
String> ? onLabelTap, - ValueChanged<
String> ? onLabelChange, - InputDecoration? decoration,
- FieldConverter<
T?> ? converter, - required SunnyFormFieldBuilder<
T> ? builder, - bool? captureNestedPaths,
- bool? enabled = true,
- bool? isReadOnly = false,
- FocusNode? focusNode,
- AttributeAccepter<
T?> ? onReadOnlyTapped, - T? initialValue,
- FormValueChanged<
T?> ? onChange, - FormController? form,
- 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'}"));