FlutterTextfield constructor

const FlutterTextfield({
  1. Key? key,
  2. String? hintText,
  3. TextEditingController? controller,
  4. void onChanged(
    1. String val
    )?,
  5. TextInputType keyboardType = TextInputType.text,
  6. IconData errorIcon = Icons.error_sharp,
  7. Color errorColor = const Color(0xFFD8272D),
  8. double errorIconSize = 16,
  9. bool isObscure = false,
  10. bool autofocus = false,
  11. bool readOnly = false,
  12. FocusNode? focusNode,
  13. EdgeInsets? contentPadding,
  14. String? validator(
    1. String val
    )?,
  15. Widget? suffixWidget,
  16. int? maxLines,
  17. Widget? prefixWidget,
  18. bool? enabled,
  19. int? maxLength,
  20. TextInputAction? textInputAction,
  21. TextStyle? errorTextStyle,
  22. TextStyle? textStyle,
  23. void onTap()?,
  24. Color? cursorColor,
  25. InputBorder? border,
  26. TextStyle? hintTextStyle,
  27. List<TextInputFormatter>? inputFormatters,
  28. String? labelText,
  29. InputBorder? disabledBorder,
  30. InputBorder? errorBorder,
  31. InputBorder? enabledBorder,
  32. TextStyle? labelStyle,
})

Creates a FlutterCustomEdit widget.

The controller parameter is optional and controls the text being edited.

Implementation

const FlutterTextfield({
  super.key,
  this.hintText,
  this.controller, // Nullable
  this.onChanged,
  this.keyboardType = TextInputType.text,
  this.errorIcon = Icons.error_sharp,
  this.errorColor = const Color(0xFFD8272D),
  this.errorIconSize = 16,
  this.isObscure = false,
  this.autofocus = false,
  this.readOnly = false,
  this.focusNode,
  this.contentPadding,
  this.validator,
  this.suffixWidget,
  this.maxLines,
  this.prefixWidget,
  this.enabled,
  this.maxLength,
  this.textInputAction,
  this.errorTextStyle,
  this.textStyle,
  this.onTap,
  this.cursorColor,
  this.border,
  this.hintTextStyle,
  this.inputFormatters,
  this.labelText,
  this.disabledBorder,
  this.errorBorder,
  this.enabledBorder,
  this.labelStyle,
});