TextArea constructor
TextArea({
- String? label,
- String? name,
- TextEditingController? controller,
- Object? value,
- String? placeholder,
- int rows = 4,
- bool required = false,
- bool disabled = false,
- InputVariant variant = InputVariant.outline,
- ComponentSize size = ComponentSize.md,
- String? error,
- FormErrors? errors,
- String? helpText,
- String? className,
- Map<
String, Object?> props = const {}, - Map<
String, Object?> textareaProps = const {}, - Map<
String, Object?> style = const {}, - Map<
String, Object?> textareaStyle = const {}, - DartStyle? dartStyle,
- DartStyle? textareaDartStyle,
- void onChanged(
- Object event
Creates a multiline text field.
Implementation
TextArea({
String? label,
String? name,
TextEditingController? controller,
Object? value,
String? placeholder,
int rows = 4,
bool required = false,
bool disabled = false,
InputVariant variant = InputVariant.outline,
ComponentSize size = ComponentSize.md,
String? error,
FormErrors? errors,
String? helpText,
String? className,
Map<String, Object?> props = const {},
Map<String, Object?> textareaProps = const {},
Map<String, Object?> style = const {},
Map<String, Object?> textareaStyle = const {},
DartStyle? dartStyle,
DartStyle? textareaDartStyle,
void Function(Object event)? onChanged,
}) : super(
'div',
props: fieldWrapperProps(
props: props,
className: className,
dartStyle: dartStyle,
style: style,
),
children: _children(
label: label,
name: name,
value: controller?.text ?? value,
placeholder: placeholder,
rows: rows,
required: required,
disabled: disabled,
variant: variant,
size: size,
error: resolveFieldError(name: name, error: error, errors: errors),
helpText: helpText,
textareaProps: textareaProps,
textareaStyle: textareaStyle,
textareaDartStyle: textareaDartStyle,
onChanged: _controlledOnChanged(controller, onChanged),
),
);