text method
void
text({
- required String customId,
- required String title,
- String? placeholder,
- String? defaultValue,
- DialogFieldConstraint? constraint,
Implementation
void text(
{required String customId,
required String title,
String? placeholder,
String? defaultValue,
DialogFieldConstraint? constraint}) {
final element = DialogElementBuilder.input(customId);
if (placeholder != null) {
element.setPlaceholder(placeholder);
}
if (defaultValue != null) {
element.setDefaultValue(defaultValue);
}
if (constraint != null) {
element.setConstraint(
maxLength: constraint.maxLength,
minLength: constraint.minLength,
required: constraint.required,
);
}
element.setLabel(title);
final row = RowBuilder()..addComponent(element);
_elements.add(row);
}