TextFormField constructor

TextFormField({
  1. required String label,
  2. String description = '',
  3. String? initialValue,
  4. String? validator(
    1. String?
    )?,
  5. bool focused = false,
  6. Style style = Style.empty,
  7. Style cursorStyle = const Style(modifiers: Modifier.reverse),
  8. String placeholder = '',
  9. Style placeholderStyle = const Style(foreground: Color(128, 128, 128)),
})

Creates a TextFormField for single-line text input.

Implementation

TextFormField({
  required super.label,
  super.description = '',
  super.initialValue,
  super.validator,
  super.focused = false,
  Style style = Style.empty,
  Style cursorStyle = const Style(modifiers: Modifier.reverse),
  String placeholder = '',
  Style placeholderStyle = const Style(foreground: Color(128, 128, 128)),
}) : _input = TextField(
       initialText: initialValue ?? '',
       style: style,
       cursorStyle: cursorStyle,
       placeholder: placeholder,
       placeholderStyle: placeholderStyle,
       focused: focused,
     );