FormFieldConfig class

Configuration for a single text field inside a FormPrompt.

Each field has its own label, optional placeholder, masking settings, and validation. Fields are rendered vertically inside a shared frame, with the focused field receiving keyboard input.

FormFieldConfig(
  label: 'Password',
  masked: true,
  required: true,
)

Constructors

FormFieldConfig({required String label, String? placeholder, bool masked = false, String maskChar = '•', bool allowReveal = false, bool required = false, String? validator(String text)?, String? initialValue})
const

Properties

allowReveal → bool
Whether Ctrl+R toggles plain-text reveal on this field.
final
hashCode → int
The hash code for this object.
no setterinherited
initialValue → String?
Optional initial value pre-filled into the buffer.
final
label → String
Label displayed to the left of the input.
final
maskChar → String
Character used to mask input when masked is true.
final
masked → bool
When true, input is displayed as maskChar characters.
final
placeholder → String?
Placeholder text shown when the field is empty and focused.
final
required → bool
Whether the field must be non-empty to submit.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
validator → String? Function(String text)?
Per-field validator. Return null if valid, or an error message if not. Returning '' is also accepted as success for backwards compatibility.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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