MoonTextArea class

Inheritance

Constructors

MoonTextArea({Key? key, AutovalidateMode autovalidateMode = AutovalidateMode.disabled, bool autocorrect = true, bool autofocus = false, bool enabled = true, bool enableIMEPersonalizedLearning = true, bool? enableInteractiveSelection, bool enableSuggestions = true, bool expands = false, bool readOnly = false, bool scribbleEnabled = true, bool? showCursor, BorderRadiusGeometry? borderRadius, Brightness? keyboardAppearance, Clip? clipBehavior, Color? backgroundColor, Color? activeBorderColor, Color? inactiveBorderColor, Color? errorColor, Color? hoverBorderColor, Color? textColor, Color? hintTextColor, double? height, Duration? transitionDuration, Curve? transitionCurve, EdgeInsets scrollPadding = const EdgeInsets.all(24.0), EdgeInsetsGeometry? helperPadding, EdgeInsetsGeometry? textPadding, FocusNode? focusNode, FormFieldValidator<String>? validator, int? maxLength, int? minLines, Iterable<String>? autofillHints, List<TextInputFormatter>? inputFormatters, MaxLengthEnforcement? maxLengthEnforcement, ScrollController? scrollController, ScrollPhysics? scrollPhysics, Decoration? decoration, String? hintText, String? initialValue, String? restorationId, String? semanticLabel, StrutStyle? strutStyle, TextAlign textAlign = TextAlign.start, TextCapitalization textCapitalization = TextCapitalization.none, TextDirection? textDirection, TextEditingController? controller, TextInputAction? textInputAction, TextStyle? textStyle, TextStyle? helperTextStyle, GestureTapCallback? onTap, TapRegionCallback? onTapOutside, ValueChanged<String>? onChanged, VoidCallback? onEditingComplete, ValueChanged<String?>? onSaved, ValueChanged<String>? onSubmitted, MoonTextAreaErrorBuilder? errorBuilder, Widget? helper})
Creates a Moon Design text area.
const

Properties

activeBorderColor Color?
The border color of the active or focused text area.
final
autocorrect bool
Whether to enable autocorrection.
final
autofillHints Iterable<String>?
A list of strings that helps the autofill service identify the type of this text input.
final
autofocus bool
Whether this text field should focus itself if nothing else is already focused.
final
autovalidateMode AutovalidateMode
Sets the auto validation mode of the text area.
final
backgroundColor Color?
The background color of the text area.
final
borderRadius BorderRadiusGeometry?
The border radius of the text area.
final
clipBehavior Clip?
The content will be clipped (or not) according to this option.
final
controller TextEditingController?
The TextEditingController used to edit the text in the text area.
final
decoration Decoration?
The custom decoration of the text area.
final
enabled bool
Whether the text area is enabled. When false, taps are ignored and the opacity reduced.
final
enableIMEPersonalizedLearning bool
Whether to enable that the IME update personalized data such as typing history and user dictionary data.
final
enableInteractiveSelection bool?
Whether to enable user interface affordances for changing the text selection.
final
enableSuggestions bool
Whether to show input suggestions as the user types.
final
errorBuilder MoonTextAreaErrorBuilder?
A builder to build the text area error widget.
final
errorColor Color?
The color of the text area in error state.
final
expands bool
Whether this widget's height will be sized to fill its parent.
final
focusNode FocusNode?
An optional focus node to use as the focus node for this widget.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
The height of the text area (does not include the space taken by MoonTextArea.errorBuilder).
final
helper Widget?
The widget to display below the text area. Not displayed in error state.
final
helperPadding EdgeInsetsGeometry?
The padding of the helper and errorBuilder widgets.
final
helperTextStyle TextStyle?
The text style of the helper widget or error state text.
final
hintText String?
The hint text to display in the text area.
final
hintTextColor Color?
The text color of the text area hint.
final
hoverBorderColor Color?
The border color of the text area on hover.
final
inactiveBorderColor Color?
The border color of the inactive text area.
final
initialValue String?
The initial value of the text area.
final
inputFormatters List<TextInputFormatter>?
Optional input validation and formatting overrides.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardAppearance Brightness?
The appearance of the keyboard.
final
maxLength int?
The maximum number of characters (unicode grapheme clusters) to allow in the text area.
final
maxLengthEnforcement MaxLengthEnforcement?
Determines how the maxLength limit should be enforced.
final
minLines int?
The minimum number of lines to occupy when the content spans fewer lines.
final
onChanged ValueChanged<String>?
Called when the user initiates a change to the TextField's value: when they have inserted or deleted text.
final
onEditingComplete VoidCallback?
Called when the user submits editable content (e.g., user presses the "done" button on the keyboard).
final
onSaved ValueChanged<String?>?
FormState.save.
final
onSubmitted ValueChanged<String>?
Called when the user indicates that they are done editing the text in the field.
final
onTap GestureTapCallback?
The callback that is called when the user taps on the text area.
final
onTapOutside TapRegionCallback?
The callback that is called when the user taps outside the text area.
final
readOnly bool
Whether the text can be changed.
final
restorationId String?
Restoration ID to save and restore the state of the text field.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scribbleEnabled bool
Whether iOS 14 Scribble features are enabled for this widget.
final
scrollController ScrollController?
The ScrollController to use when vertically scrolling the input.
final
scrollPadding EdgeInsets
Configures padding to edges surrounding a Scrollable when the Textfield scrolls into view.
final
scrollPhysics ScrollPhysics?
The ScrollPhysics to use when vertically scrolling the input.
final
semanticLabel String?
The semantic label for the text area.
final
showCursor bool?
Whether to show cursor.
final
strutStyle StrutStyle?
The strut style used for the vertical layout.
final
textAlign TextAlign
How the text should be aligned horizontally.
final
textCapitalization TextCapitalization
Configures how the platform keyboard will select an uppercase or lowercase keyboard.
final
textColor Color?
The text color of the text area.
final
textDirection TextDirection?
The directionality of the text.
final
textInputAction TextInputAction?
The type of action button to use for the keyboard.
final
textPadding EdgeInsetsGeometry?
The padding of the text content.
final
textStyle TextStyle?
The text style of the input text.
final
transitionCurve Curve?
The curve of the text area transition animation (enable and disable).
final
transitionDuration Duration?
The duration of the text area transition animation (enable and disable).
final
validator FormFieldValidator<String>?
The text validator for the text area widget.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited