FiftyTextField class

A text field with FDL v2 styling.

Features:

  • 48px fixed height
  • xl border radius (16px)
  • Mode-aware border colors
  • Focus ring with theme accent
  • Manrope font family
  • Error state styling
  • Optional prefix/suffix icons
  • Configurable border styles (full, bottom, none)
  • Configurable prefix styles (chevron, comment, none, custom)
  • Configurable cursor styles (line, block, underscore)
  • Terminal mode with "> " prefix

Example:

FiftyTextField(
  controller: _emailController,
  label: 'Email',
  hint: 'Enter your email',
  prefix: Icon(Icons.email),
)

Terminal mode example:

FiftyTextField(
  controller: _commandController,
  terminalStyle: true,
  hint: 'Enter command',
)
Inheritance

Constructors

FiftyTextField({Key? key, TextEditingController? controller, String? label, String? hint, String? errorText, Widget? prefix, Widget? suffix, bool obscureText = false, int? maxLines = 1, int? minLines, ValueChanged<String>? onChanged, ValueChanged<String>? onSubmitted, bool enabled = true, bool autofocus = false, TextInputType? keyboardType, TextInputAction? textInputAction, FocusNode? focusNode, bool terminalStyle = false, FiftyBorderStyle borderStyle = FiftyBorderStyle.full, FiftyPrefixStyle? prefixStyle, String? customPrefix, FiftyCursorStyle cursorStyle = FiftyCursorStyle.line, FiftyTextFieldShape shape = FiftyTextFieldShape.standard})
Creates a Fifty-styled text field.
const

Properties

autofocus bool
Whether to autofocus on mount.
final
borderStyle FiftyBorderStyle
The border style of the text field.
final
controller TextEditingController?
Controller for the text field.
final
cursorStyle FiftyCursorStyle
The cursor style for the text field.
final
customPrefix String?
Custom prefix string when prefixStyle is FiftyPrefixStyle.custom.
final
enabled bool
Whether the field is enabled.
final
errorText String?
Error text displayed below the field.
final
focusNode FocusNode?
Focus node for the field.
final
hashCode int
The hash code for this object.
no setterinherited
hint String?
Hint text displayed when the field is empty.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardType TextInputType?
The type of keyboard to show.
final
label String?
Label text displayed above the field.
final
maxLines int?
Maximum number of lines.
final
minLines int?
Minimum number of lines.
final
obscureText bool
Whether to obscure the text (for passwords).
final
onChanged ValueChanged<String>?
Callback when the text changes.
final
onSubmitted ValueChanged<String>?
Callback when the user submits.
final
prefix Widget?
Widget displayed before the input (e.g., an icon).
final
prefixStyle FiftyPrefixStyle?
The prefix style for the text field.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape FiftyTextFieldShape
The shape of the text field.
final
suffix Widget?
Widget displayed after the input (e.g., a button).
final
terminalStyle bool
Whether to display in terminal style.
final
textInputAction TextInputAction?
The action button on the keyboard.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<FiftyTextField>
Creates the mutable state for this widget at a given location in the tree.
override
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, int wrapWidth = 65}) 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