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.
TextField
const TextField({
super.key,
this.size,
this.controller,
this.focusNode,
this.initialValue,
this.onChanged,
this.onSubmitted,
this.hintText,
this.label,
this.description,
this.errorText,
this.prefix,
this.suffix,
this.enabled = true,
this.readOnly = false,
this.obscureText = false,
this.autofocus = false,
this.keyboardType = TextInputType.text,
this.textInputAction,
this.textCapitalization = TextCapitalization.none,
this.textAlign = TextAlign.start,
this.maxLines = 1,
this.minLines,
this.maxLength,
this.maxLengthEnforcement = MaxLengthEnforcement.enforced,
this.inputFormatters,
this.autofillHints,
this.showCounter = false,
this.padding,
this.borderRadius,
this.borderWidth = 1,
this.fontSize,
this.labelFontSize,
this.descriptionFontSize,
this.color,
this.textColor,
this.hintColor,
this.labelColor,
this.descriptionColor,
this.borderColor,
this.focusedBorderColor,
this.errorColor,
this.cursorColor,
this.enabledOpacity = 1,
this.onEditingComplete,
});| Parameter | Type | Required | Default |
|---|---|---|---|
key | Key? | No | null |
size | ComponentSize? | No | null |
controller | TextEditingController? | No | null |
focusNode | FocusNode? | No | null |
initialValue | String? | No | null |
onChanged | ValueChanged<String>? | No | null |
onSubmitted | ValueChanged<String>? | No | null |
hintText | String? | No | null |
label | String? | No | null |
description | String? | No | null |
errorText | String? | No | null |
prefix | Widget? | No | null |
suffix | Widget? | No | null |
enabled | bool | No | true |
readOnly | bool | No | false |
obscureText | bool | No | false |
autofocus | bool | No | false |
keyboardType | TextInputType | No | TextInputType.text |
textInputAction | TextInputAction? | No | null |
textCapitalization | TextCapitalization | No | TextCapitalization.none |
textAlign | TextAlign | No | TextAlign.start |
maxLines | int? | No | 1 |
minLines | int? | No | null |
maxLength | int? | No | null |
maxLengthEnforcement | MaxLengthEnforcement | No | MaxLengthEnforcement.enforced |
inputFormatters | List<TextInputFormatter>? | No | null |
autofillHints | Iterable<String>? | No | null |
showCounter | bool | No | false |
padding | EdgeInsetsGeometry? | No | null |
borderRadius | double? | No | null |
borderWidth | double | No | 1 |
fontSize | double? | No | null |
labelFontSize | double? | No | null |
descriptionFontSize | double? | No | null |
color | Color? | No | null |
textColor | Color? | No | null |
hintColor | Color? | No | null |
labelColor | Color? | No | null |
descriptionColor | Color? | No | null |
borderColor | Color? | No | null |
focusedBorderColor | Color? | No | null |
errorColor | Color? | No | null |
cursorColor | Color? | No | null |
enabledOpacity | double | No | 1 |
onEditingComplete | VoidCallback? | No | null |
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_field/text_field.dart
This reference is generated from the TextField declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

