DDSTextField constructor
const
DDSTextField({
- Key? key,
- String label = '',
- String placeholder = '',
- String helperText = '',
- String errorMessage = '',
- Widget? startIcon,
- Widget? endIcon,
- double? height,
- double? width,
- double? labelRequiredStarGap,
- String? labelAdditionalText,
- TextStyle? labelAdditionalTextStyle,
- double? labelAdditionalTextGap = 8,
- Color? backgroundColor = Colors.transparent,
- double? horizontalIncrementHeight = 20,
- double? horizontalIncrementWidth = 160,
- double? verticalIncrementHeight = 120,
- double? verticalIncrementWidth = 80,
- TextFieldVariant variant = TextFieldVariant.basic,
- bool isPassword = false,
- bool isEnabled = true,
- bool readOnly = false,
- bool autocorrect = false,
- bool required = false,
- String? value,
- String? defaultValue,
- TextEditingController? controller,
- GestureTapCallback? onTap,
- TapRegionCallback? onTapOutside,
- TextStyle? placeholderStyle,
- TextStyle? helperTextStyle,
- TextStyle? labelTextStyle,
- TextStyle? charCountTextStyle,
- TextFieldShape? shape = TextFieldShape.rectangle,
- TextInputType inputType = TextInputType.text,
- ValueChanged<
String> ? onChanged, - TextStyle? style,
- Widget? incrementIcon,
- Widget? decrementIcon,
- VoidCallback? onIncrementClick,
- VoidCallback? onDecrementClick,
- List<
CountryCodeData> ? countryCodes = const [], - FocusNode? focusNode,
- InputDecoration? decoration,
- dynamic onPhoneNumberChanged()?,
- int? maxCharacters,
- bool textWrap = false,
- int? minVisibleLines,
- int? maxVisibleLines,
- CharacterCountIndicatorPosition indicatorPosition = CharacterCountIndicatorPosition.outside,
- Color? visibilityIconColor,
- Color? focusedBorderColor,
- Color? textFieldBorderColor,
- EdgeInsets? padding,
- double? dropdownMenuWidth,
- double? borderRadius,
- double cursorWidth = 2.0,
- double? cursorHeight,
- Radius? cursorRadius,
- bool? cursorOpacityAnimates,
- double? horizontalIconPadding = 8.0,
- Color? cursorColor,
- Color? cursorErrorColor,
- bool autofocus = false,
- bool? showCursor,
- bool enableCustomSelection = false,
- Widget? customSelectionHandleWidget,
- Color? selectionHandleColor,
- Color? textSelectionColor,
- double flagWidth = 20.0,
- double flagHeight = 15.0,
- TextInputAction? textInputAction,
- ValueChanged<
String> ? onSubmitted, - List<
TextInputFormatter> ? inputFormatters, - 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);