CustomTextField constructor

const CustomTextField({
  1. Key? key,
  2. String? label,
  3. String? hint,
  4. TextEditingController? controller,
  5. bool obscureText = false,
  6. TextInputType keyboardType = TextInputType.text,
  7. Widget? leadingIcon,
  8. Widget? trailingIcon,
  9. String? validator(
    1. String?
    )?,
  10. List<TextInputFormatter>? inputFormatters,
  11. void onChanged(
    1. String
    )?,
  12. FocusNode? focusNode,
  13. bool enabled = true,
  14. String? initialValue,
  15. int? maxLength,
  16. bool readOnly = false,
  17. void onTap()?,
  18. Color? cursorColor,
  19. BoxDecoration? decoration,
  20. InputDecoration? inputDecoration,
  21. TextStyle? textStyle,
  22. EdgeInsetsGeometry contentPadding = const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
  23. TextCapitalization textCapitalization = TextCapitalization.none,
  24. AutovalidateMode? autovalidateMode = AutovalidateMode.onUserInteraction,
  25. TextInputAction? textInputAction,
  26. dynamic onFieldSubmitted(
    1. String
    )?,
  27. int? maxLines = 1,
  28. bool preventConsecutiveSpaces = true,
  29. bool preventLeadingTrailingSpaces = true,
  30. RegExp? inputFormatterPattern,
  31. bool useInputFormatter = true,
  32. bool? autofocus,
})

Implementation

const CustomTextField({
  super.key,
  this.label,
  this.hint,
  this.controller,
  this.obscureText = false,
  this.keyboardType = TextInputType.text,
  this.leadingIcon,
  this.trailingIcon,
  this.validator,
  this.inputFormatters,
  this.onChanged,
  this.focusNode,
  this.enabled = true,
  this.initialValue,
  this.maxLength,
  this.readOnly = false,
  this.onTap,
  this.cursorColor,
  this.decoration,
  this.inputDecoration,
  this.textStyle,
  this.contentPadding = const EdgeInsets.symmetric(
    horizontal: 16,
    vertical: 16,
  ),
  this.textCapitalization = TextCapitalization.none,
  this.autovalidateMode = AutovalidateMode.onUserInteraction,
  this.textInputAction,
  this.onFieldSubmitted,
  this.maxLines = 1,
  this.preventConsecutiveSpaces = true,
  this.preventLeadingTrailingSpaces = true,
  this.inputFormatterPattern,
  this.useInputFormatter = true,
  this.autofocus,
});