DDSTextField constructor

const DDSTextField({
  1. Key? key,
  2. String label = '',
  3. String placeholder = '',
  4. String helperText = '',
  5. String errorMessage = '',
  6. Widget? startIcon,
  7. Widget? endIcon,
  8. double? height,
  9. double? width,
  10. double? labelRequiredStarGap,
  11. String? labelAdditionalText,
  12. TextStyle? labelAdditionalTextStyle,
  13. double? labelAdditionalTextGap = 8,
  14. Color? backgroundColor = Colors.transparent,
  15. double? horizontalIncrementHeight = 20,
  16. double? horizontalIncrementWidth = 160,
  17. double? verticalIncrementHeight = 120,
  18. double? verticalIncrementWidth = 80,
  19. TextFieldVariant variant = TextFieldVariant.basic,
  20. bool isPassword = false,
  21. bool isEnabled = true,
  22. bool readOnly = false,
  23. bool autocorrect = false,
  24. bool required = false,
  25. String? value,
  26. String? defaultValue,
  27. TextEditingController? controller,
  28. GestureTapCallback? onTap,
  29. TapRegionCallback? onTapOutside,
  30. TextStyle? placeholderStyle,
  31. TextStyle? helperTextStyle,
  32. TextStyle? labelTextStyle,
  33. TextStyle? charCountTextStyle,
  34. TextFieldShape? shape = TextFieldShape.rectangle,
  35. TextInputType inputType = TextInputType.text,
  36. ValueChanged<String>? onChanged,
  37. TextStyle? style,
  38. Widget? incrementIcon,
  39. Widget? decrementIcon,
  40. VoidCallback? onIncrementClick,
  41. VoidCallback? onDecrementClick,
  42. List<CountryCodeData>? countryCodes = const [],
  43. FocusNode? focusNode,
  44. InputDecoration? decoration,
  45. dynamic onPhoneNumberChanged(
    1. String countryCode,
    2. String phoneNumber
    )?,
  46. int? maxCharacters,
  47. bool textWrap = false,
  48. int? minVisibleLines,
  49. int? maxVisibleLines,
  50. CharacterCountIndicatorPosition indicatorPosition = CharacterCountIndicatorPosition.outside,
  51. Color? visibilityIconColor,
  52. Color? focusedBorderColor,
  53. Color? textFieldBorderColor,
  54. EdgeInsets? padding,
  55. double? dropdownMenuWidth,
  56. double? borderRadius,
  57. double cursorWidth = 2.0,
  58. double? cursorHeight,
  59. Radius? cursorRadius,
  60. bool? cursorOpacityAnimates,
  61. double? horizontalIconPadding = 8.0,
  62. Color? cursorColor,
  63. Color? cursorErrorColor,
  64. bool autofocus = false,
  65. bool? showCursor,
  66. bool enableCustomSelection = false,
  67. Widget? customSelectionHandleWidget,
  68. Color? selectionHandleColor,
  69. Color? textSelectionColor,
  70. double flagWidth = 20.0,
  71. double flagHeight = 15.0,
  72. TextInputAction? textInputAction,
  73. ValueChanged<String>? onSubmitted,
  74. List<TextInputFormatter>? inputFormatters,
  75. bool showCharacterCount = true,
})

Implementation

const DDSTextField({
  Key? key,
  this.label = '',
  this.placeholder = '',
  this.helperText = '',
  this.errorMessage = '',
  this.startIcon,
  this.endIcon,
  this.height,
  this.width,
  this.labelRequiredStarGap,
  this.labelAdditionalText,
  this.labelAdditionalTextStyle,
  this.labelAdditionalTextGap = 8,
  this.backgroundColor = Colors.transparent,
  this.horizontalIncrementHeight = 20,
  this.horizontalIncrementWidth = 160,
  this.verticalIncrementHeight = 120,
  this.verticalIncrementWidth = 80,
  this.variant = TextFieldVariant.basic,
  this.isPassword = false,
  this.isEnabled = true,
  this.readOnly = false,
  this.autocorrect = false,
  this.required = false,
  this.value,
  this.defaultValue,
  this.controller,
  this.onTap,
  this.onTapOutside,
  this.placeholderStyle,
  this.helperTextStyle,
  this.labelTextStyle,
  this.charCountTextStyle,
  this.shape = TextFieldShape.rectangle,
  this.inputType = TextInputType.text,
  this.onChanged,
  this.style,
  this.incrementIcon,
  this.decrementIcon,
  this.onIncrementClick,
  this.onDecrementClick,
  this.countryCodes = const [],
  this.focusNode,
  this.decoration,
  this.onPhoneNumberChanged,
  this.maxCharacters,
  this.textWrap = false,
  this.minVisibleLines,
  this.maxVisibleLines,
  this.indicatorPosition = CharacterCountIndicatorPosition.outside,
  this.visibilityIconColor,
  this.focusedBorderColor,
  this.textFieldBorderColor,
  this.padding,
  this.dropdownMenuWidth,
  this.borderRadius,
  this.cursorWidth = 2.0,
  this.cursorHeight,
  this.cursorRadius,
  this.cursorOpacityAnimates,
  this.horizontalIconPadding = 8.0,
  this.cursorColor,
  this.cursorErrorColor,
  this.autofocus = false,
  this.showCursor,
  this.enableCustomSelection = false,
  this.customSelectionHandleWidget,
  this.selectionHandleColor,
  this.textSelectionColor,
  this.flagWidth = 20.0,
  this.flagHeight = 15.0,
  this.textInputAction,
  this.onSubmitted,
  this.inputFormatters,
  this.showCharacterCount = true,
}) : super(key: key);