Skip to content
On this page

TextArea

A multiline text input with editing and appearance options.

TextArea in FluttyUITextArea in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

TextArea

const TextArea({
  super.key,
  this.size,
  required this.controller,
  this.focusNode,
  this.textInputAction = TextInputAction.newline,
  this.textCapitalization = TextCapitalization.none,
  this.autocorrect = true,
  this.onEditingComplete,
  this.onChanged,
  this.onSubmitted,
  this.placeholder = 'Enter text...',
  this.label,
  this.description,
  this.errorText,
  this.backgroundColor,
  this.foregroundColor,
  this.placeholderColor,
  this.borderColor,
  this.focusColor,
  this.errorColor,
  this.borderRadius,
  this.padding,
  this.fontSize,
  this.minLines = 3,
  this.maxLines = 6,
  this.maxLength,
  this.maxLengthEnforcement = MaxLengthEnforcement.enforced,
  this.inputFormatters,
  this.autofillHints,
  this.enabled = true,
  this.readOnly = false,
  this.autofocus = false,
  this.showCounter = false,
  this.expand = false,
});
ParameterTypeRequiredDefault
keyKey?Nonull
sizeComponentSize?Nonull
controllerTextEditingControllerYes—
focusNodeFocusNode?Nonull
textInputActionTextInputActionNoTextInputAction.newline
textCapitalizationTextCapitalizationNoTextCapitalization.none
autocorrectboolNotrue
onEditingCompleteVoidCallback?Nonull
onChangedValueChanged<String>?Nonull
onSubmittedValueChanged<String>?Nonull
placeholderStringNo'Enter text...'
labelString?Nonull
descriptionString?Nonull
errorTextString?Nonull
backgroundColorColor?Nonull
foregroundColorColor?Nonull
placeholderColorColor?Nonull
borderColorColor?Nonull
focusColorColor?Nonull
errorColorColor?Nonull
borderRadiusdouble?Nonull
paddingEdgeInsetsGeometry?Nonull
fontSizedouble?Nonull
minLinesintNo3
maxLinesint?No6
maxLengthint?Nonull
maxLengthEnforcementMaxLengthEnforcementNoMaxLengthEnforcement.enforced
inputFormattersList<TextInputFormatter>?Nonull
autofillHintsIterable<String>?Nonull
enabledboolNotrue
readOnlyboolNofalse
autofocusboolNofalse
showCounterboolNofalse
expandboolNofalse

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/forms/text_area/text_area.dart

This reference is generated from the TextArea declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI