SILFormTextField constructor

const SILFormTextField({
  1. Key? key,
  2. bool? enabled,
  3. TextEditingController? controller,
  4. FormFieldSetter<String>? onSaved,
  5. Function? onTap,
  6. String? labelText,
  7. String? hintText,
  8. String? initialValue,
  9. FormFieldValidator<String>? validator,
  10. ValueChanged<String>? onChanged,
  11. ValueChanged<String>? onFieldSubmit,
  12. FocusNode? focusNode,
  13. TextInputType? keyboardType,
  14. List<TextInputFormatter>? formatters,
  15. int? maxLines,
  16. int? maxLength,
  17. TextStyle? textStyle,
  18. Widget? suffixIcon,
  19. bool? isSearchField,
  20. bool? obscureText,
  21. bool? autoValidate = false,
  22. bool? isSearchFieldSmall,
  23. bool? autoFocus,
  24. List<TextInputFormatter>? inputFormatters,
  25. Widget? prefixIcon,
  26. TextInputAction? textInputAction,
  27. Color? customFillColor,
  28. Color? hintColor,
  29. Color? hintTextColor,
  30. Color? borderColor,
  31. Color? textFieldBackgroundColor,
  32. InputDecoration? decoration,
  33. Key? fieldKey,
})

When a controller is specified, initialValue must be null (the default).

Implementation

const SILFormTextField({
  Key? key,
  this.enabled,
  this.controller,
  this.onSaved,
  this.onTap,
  this.labelText,
  this.hintText,
  this.initialValue,
  this.validator,
  this.onChanged,
  this.onFieldSubmit,
  this.focusNode,
  this.keyboardType,
  this.formatters,
  this.maxLines,
  this.maxLength,
  this.textStyle,
  this.suffixIcon,
  this.isSearchField,
  this.obscureText,
  this.autoValidate = false,
  this.isSearchFieldSmall,
  this.autoFocus,
  this.inputFormatters,
  this.prefixIcon,
  this.textInputAction,
  this.customFillColor,
  this.hintColor,
  this.hintTextColor,
  this.borderColor,
  this.textFieldBackgroundColor,
  this.decoration,
  this.fieldKey,
})  : assert(initialValue == null || controller == null,
          'When a controller is specified, initialValue must be null'),
      super(key: key);