FlutterTextfield constructor
const
FlutterTextfield({
- Key? key,
- String? hintText,
- TextEditingController? controller,
- void onChanged(
- String val
- TextInputType keyboardType = TextInputType.text,
- IconData errorIcon = Icons.error_sharp,
- Color errorColor = const Color(0xFFD8272D),
- double errorIconSize = 16,
- bool isObscure = false,
- bool autofocus = false,
- bool readOnly = false,
- FocusNode? focusNode,
- EdgeInsets? contentPadding,
- String? validator(
- String val
- Widget? suffixWidget,
- int? maxLines,
- Widget? prefixWidget,
- bool? enabled,
- int? maxLength,
- TextInputAction? textInputAction,
- TextStyle? errorTextStyle,
- TextStyle? textStyle,
- void onTap()?,
- Color? cursorColor,
- InputBorder? border,
- TextStyle? hintTextStyle,
- List<
TextInputFormatter> ? inputFormatters, - String? labelText,
- InputBorder? disabledBorder,
- InputBorder? errorBorder,
- InputBorder? enabledBorder,
- 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,
});