CTextField constructor
CTextField({
- Key? key,
- String type = "CUSTOM",
- TextEditingController? controller,
- InputDecoration? decoration,
- String? hintText,
- TextInputType? keyboardType,
- TextInputAction? textInputAction = TextInputAction.next,
- TextStyle? style,
- TextStyle? styleHint,
- bool readOnly = false,
- bool obscureText = false,
- int? maxLines,
- int? minLines,
- int? maxLength,
- dynamic onEditingComplete()?,
- dynamic onFieldSubmitted()?,
- String? validator()?,
- AutovalidateMode? autoValidateMode,
- bool? enabled,
- dynamic onTap()?,
- dynamic onChange()?,
- FocusNode? focusNode,
- Widget? suffixIcon,
- IconData? suffixIconPasswordEye,
- IconData? suffixIconPasswordEyeOff,
- Color? suffixIconColor,
- Widget? prefixIcon,
- Color? prefixIconColor,
- TextCapitalization? textCapitalization,
- bool filled = true,
- Color? fillColor = Colors.white,
- Color? focusColor = Colors.white,
- OutlineInputBorder? border,
- OutlineInputBorder? enabledBorder,
- OutlineInputBorder? focusBorder,
- OutlineInputBorder? errorBorder,
Implementation
CTextField(
{Key? key,
this.type = "CUSTOM",
this.controller,
this.decoration,
this.hintText,
this.keyboardType,
this.textInputAction = TextInputAction.next,
this.style,
this.styleHint,
this.readOnly = false,
this.obscureText = false,
this.maxLines,
this.minLines,
this.maxLength,
this.onEditingComplete,
this.onFieldSubmitted,
this.validator,
this.autoValidateMode,
this.enabled,
this.onTap,
this.onChange,
this.focusNode,
this.suffixIcon,
this.suffixIconPasswordEye,
this.suffixIconPasswordEyeOff,
this.suffixIconColor,
this.prefixIcon,
this.prefixIconColor,
this.textCapitalization,
this.filled = true,
this.fillColor = Colors.white,
this.focusColor = Colors.white,
this.border,
this.enabledBorder,
this.focusBorder,
this.errorBorder})
: assert(decoration != null || hintText != null,
"Decoration / Hint, hanya boleh diisi salah satu");