CTextField constructor

CTextField({
  1. Key? key,
  2. String type = "CUSTOM",
  3. TextEditingController? controller,
  4. InputDecoration? decoration,
  5. String? hintText,
  6. TextInputType? keyboardType,
  7. TextInputAction? textInputAction = TextInputAction.next,
  8. TextStyle? style,
  9. TextStyle? styleHint,
  10. bool readOnly = false,
  11. bool obscureText = false,
  12. int? maxLines,
  13. int? minLines,
  14. int? maxLength,
  15. dynamic onEditingComplete()?,
  16. dynamic onFieldSubmitted(
    1. String
    )?,
  17. String? validator(
    1. String?
    )?,
  18. AutovalidateMode? autoValidateMode,
  19. bool? enabled,
  20. dynamic onTap()?,
  21. dynamic onChange(
    1. String
    )?,
  22. FocusNode? focusNode,
  23. Widget? suffixIcon,
  24. IconData? suffixIconPasswordEye,
  25. IconData? suffixIconPasswordEyeOff,
  26. Color? suffixIconColor,
  27. Widget? prefixIcon,
  28. Color? prefixIconColor,
  29. TextCapitalization? textCapitalization,
  30. bool filled = true,
  31. Color? fillColor = Colors.white,
  32. Color? focusColor = Colors.white,
  33. OutlineInputBorder? border,
  34. OutlineInputBorder? enabledBorder,
  35. OutlineInputBorder? focusBorder,
  36. 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");