TextFormField constructor
TextFormField({
- required String label,
- String description = '',
- String? initialValue,
- String? validator()?,
- bool focused = false,
- Style style = Style.empty,
- Style cursorStyle = const Style(modifiers: Modifier.underline),
- String placeholder = '',
- 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.underline),
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,
);