AppTextField constructor

AppTextField({
  1. Key? key,
  2. double? height = 40.0,
  3. double? width,
  4. String? floatingHint,
  5. String? initialValue,
  6. double? contentPadding = 5.0,
  7. TextEditingController? controller,
  8. void onSaved(
    1. String?
    )?,
  9. int? maxLines = 1,
  10. int? minLines = 1,
  11. FormFieldValidator<String>? validator,
  12. Color? hintColor,
  13. Color? textColor,
  14. Color? underlineColor,
  15. TextInputType? keyboardType,
  16. bool? showPasswordType = false,
  17. bool? enabled = true,
  18. void onTap()?,
  19. bool? autoFocus = false,
  20. double? fontSize = 13.0,
  21. int? maxLength,
  22. TextAlign? textAlign = TextAlign.start,
  23. FocusNode? focusNode,
  24. Color? cursorColor,
  25. String? hint,
  26. String? errorText,
  27. FontWeight? fontWeight,
  28. bool? isRoundedBorer = false,
  29. Color? borderColor,
  30. double? borderRadius = 10,
  31. double? borderWidth = 1.0,
  32. bool? autovalidate = false,
  33. Color? disabledColor,
  34. TextInputAction? textInputAction,
  35. Widget? icon,
  36. Widget? suffixIcon,
  37. Widget? prefixIcon,
  38. String? suffixText,
  39. TextStyle? suffixStyle,
  40. String? prefixText,
  41. TextStyle? prefixStyle,
  42. ValueChanged<String>? onChanged,
  43. ValueChanged<String>? onSubmitted,
  44. ValueChanged<String>? onFieldSubmitted,
  45. InputDecoration? decoration = const InputDecoration(),
  46. VoidCallback? onEditingComplete,
  47. TextCapitalization? textCaps,
  48. bool? autoCorrect,
  49. List<TextInputFormatter>? inputFormatters,
  50. Iterable<String>? autofillHints,
  51. bool isSearchTextField = false,
  52. bool isValidator = false,
  53. bool isEmail = false,
})

Implementation

AppTextField(
    {super.key,
    this.height = 40.0,
    this.width,
    this.floatingHint,
    this.initialValue,
    this.contentPadding = 5.0,
    this.controller,
    this.onSaved,
    this.maxLines = 1,
    this.minLines = 1,
    this.validator,
    this.hintColor,
    this.textColor,
    this.underlineColor,
    this.keyboardType,
    this.showPasswordType = false,
    this.enabled = true,
    this.onTap,
    this.autoFocus = false,
    this.fontSize = 13.0,
    this.maxLength,
    this.textAlign = TextAlign.start,
    this.focusNode,
    this.cursorColor,
    this.hint,
    this.errorText,
    this.fontWeight,
    this.isRoundedBorer = false,
    this.borderColor,
    this.borderRadius = 10,
    this.borderWidth = 1.0,
    this.autovalidate = false,
    this.disabledColor,
    this.textInputAction,
    this.icon,
    this.suffixIcon,
    this.prefixIcon,
    this.suffixText,
    this.suffixStyle,
    this.prefixText,
    this.prefixStyle,
    this.onChanged,
    this.onSubmitted,
    this.onFieldSubmitted,
    this.decoration = const InputDecoration(),
    this.onEditingComplete,
    this.textCaps,
    this.autoCorrect,
    this.inputFormatters,
    this.autofillHints,
    this.isSearchTextField = false,
    this.isValidator = false,
    this.isEmail = false}) {
  if (isRoundedBorer ?? false) {
    // inputBorder = OutlineInputBorder(
    //     borderRadius: BorderRadius.circular(borderRadius!),
    //     borderSide: BorderSide(
    //       color: borderColor ?? Colors.white,
    //       width: borderWidth!,
    //     ));
  }
}