InputField<T> constructor
InputField<T> ({
- Key? key,
- required String placeholder,
- String? hintText,
- ValueChanged<
T?> ? onChanged, - ValueChanged<
T?> ? onSaved, - String? helperText,
- int minLines = 1,
- int maxLines = 1,
- VoidCallback? onSubmit,
- FormFieldValidator<
T> ? validator, - bool isRequired = true,
- String? requiredText,
- T? initialValue,
- List<
TextInputFormatter> ? formatters, - TextInputType? keyboardType,
- TextInputAction? inputAction,
- bool isActive = true,
- bool isDisabled = false,
- bool emitDirty = true,
- bool obscureText = false,
- bool enableSuggestions = true,
- bool autocorrect = true,
- Iterable<
String> ? autofillHints, - Widget? suffix,
Implementation
InputField({
Key? key,
required this.placeholder,
this.hintText,
ValueChanged<T?>? onChanged,
ValueChanged<T?>? onSaved,
this.helperText,
this.minLines = 1,
this.maxLines = 1,
this.onSubmit,
this.validator,
bool isRequired = true,
String? requiredText,
T? initialValue,
this.formatters,
this.keyboardType,
this.inputAction,
bool isActive = true,
bool isDisabled = false,
this.emitDirty = true,
bool obscureText = false,
this.enableSuggestions = true,
this.autocorrect = true,
this.autofillHints,
Widget? suffix,
}) : _value = initialValue,
_obscureText = obscureText,
_suffix = suffix,
super(
key: key,
onChanged: onChanged,
onSaved: onSaved,
isActive: isActive,
isRequired: isRequired,
requiredText: requiredText,
isDisabled: isDisabled,
);