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. SpellCheckConfiguration? spellCheckConfiguration,
  28. bool enableSuggestions = true,
  29. TextEditingController? controller,
  30. GestureTapCallback? onTap,
  31. TapRegionCallback? onTapOutside,
  32. TextStyle? placeholderStyle,
  33. TextStyle? helperTextStyle,
  34. TextStyle? labelTextStyle,
  35. TextStyle? charCountTextStyle,
  36. TextFieldShape? shape = TextFieldShape.rectangle,
  37. TextInputType inputType = TextInputType.text,
  38. ValueChanged<String>? onChanged,
  39. TextStyle? style,
  40. Widget? incrementIcon,
  41. Widget? decrementIcon,
  42. VoidCallback? onIncrementClick,
  43. VoidCallback? onDecrementClick,
  44. List<CountryCodeData>? countryCodes = const [],
  45. FocusNode? focusNode,
  46. InputDecoration? decoration,
  47. dynamic onPhoneNumberChanged(
    1. String countryCode,
    2. String phoneNumber
    )?,
  48. int? maxCharacters,
  49. bool textWrap = false,
  50. int? minVisibleLines,
  51. int? maxVisibleLines,
  52. CharacterCountIndicatorPosition indicatorPosition = CharacterCountIndicatorPosition.outside,
  53. Color? visibilityIconColor,
  54. Color? focusedBorderColor,
  55. Color? textFieldBorderColor,
  56. EdgeInsets? padding,
  57. double? dropdownMenuWidth,
  58. double? borderRadius,
  59. double cursorWidth = 2.0,
  60. double? cursorHeight,
  61. Radius? cursorRadius,
  62. bool? cursorOpacityAnimates,
  63. double? horizontalIconPadding = 8.0,
  64. Color? cursorColor,
  65. Color? cursorErrorColor,
  66. bool autofocus = false,
  67. bool? showCursor,
  68. bool enableCustomSelection = false,
  69. Widget? customSelectionHandleWidget,
  70. Color? selectionHandleColor,
  71. Color? textSelectionColor,
  72. double flagWidth = 20.0,
  73. double flagHeight = 15.0,
  74. TextInputAction? textInputAction,
  75. ValueChanged<String>? onSubmitted,
  76. List<TextInputFormatter>? inputFormatters,
  77. 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.spellCheckConfiguration,
  this.enableSuggestions = true,
  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);