AutoFieldWidget constructor
AutoFieldWidget({
- required String id,
- required String label,
- String initValue = "",
- bool enabled = true,
- List<
FieldValidation> validations = const [], - List<
FieldTrigger> triggers = const [], - Key? key,
Implementation
AutoFieldWidget({
required this.id,
required this.label,
this.initValue = "",
this.enabled = true,
this.hidden = false,
this.validations = const [],
this.triggers = const [],
super.key,
}) {
assert(validations.where((e) => e.value == "@$id").isEmpty,
"Field validation cannot refrence itself");
assert(triggers.where((e) => e.fieldId == id).isEmpty,
"Triggers cannot refrence itself");
_valuePointer.value = initValue;
isHidden.value = hidden;
isEnabled.value = enabled;
}