TextAreaElement constructor
TextAreaElement({})
Implementation
TextAreaElement({
String? id,
String? label, //= "Comment",
String? hint, //= "Comment",
Validation? validator,
DecorationElement? decorationElement,
this.maxLines = 3,
this.showCounter = false,
this.maxCharacter = 250,
String messageError = "this field is required",
bool readOnly = false,
bool isRequired = false,
bool visibility = true,
}) : super(
id: id,
label: label,
hint: hint,
decorationElement: decorationElement,
validator: (text) {
if (isRequired && text != null && text.isEmpty) {
return messageError;
}
if (validator != null) return validator(text);
return null;
},
error: messageError,
typeInput: TypeInput.multiLine,
readOnly: readOnly,
visibility: visibility,
);