InputText constructor

const InputText({
  1. required TextEditingController? controller,
  2. InputController? inputController,
  3. InlineStyle inline = InlineStyle.clearStyle,
  4. Widget? title,
  5. bool noBorder = false,
  6. double bgRadius = 10,
  7. bool enableForm = false,
  8. bool enableClear = true,
  9. bool fixClearIcon = false,
  10. Widget? clearIcon = const Icon(Icons.cancel, size: 20, color: Colors.grey),
  11. ClearBuilder? clearBuilder,
  12. InputBorder? allLineBorder = const OutlineInputBorder(gapPadding: 0, borderRadius: BorderRadius.all(Radius.circular(10)), borderSide: BorderSide(color: Colors.transparent, width: 0)),
  13. double? width,
  14. EdgeInsetsGeometry? padding,
  15. EdgeInsetsGeometry? margin,
  16. AlignmentGeometry? alignment = Alignment.centerLeft,
  17. BuildPop? buildPop,
  18. bool onFocusShowPop = false,
  19. FocusListener? focusListener,
  20. PopBox? popBox,
  21. double marginTop = 0,
  22. double? popElevation = 0.0,
  23. Color? popColor = Colors.transparent,
  24. Color? popShadowColor,
  25. Color? popSurfaceTintColor,
  26. TextStyle? popChildTextStyle,
  27. BorderRadiusGeometry? popBorderRadius,
  28. ShapeBorder? popShape,
  29. bool cursorEnd = false,
  30. FocusNode? focusNode,
  31. InputDecoration? decoration,
  32. TextInputType? keyboardType = TextInputType.text,
  33. TextInputAction? textInputAction = TextInputAction.done,
  34. TextCapitalization textCapitalization = TextCapitalization.none,
  35. TextStyle? style = const TextStyle(fontSize: 14, color: Color(0xff222222)),
  36. StrutStyle? strutStyle,
  37. TextAlign textAlign = TextAlign.start,
  38. TextAlignVertical? textAlignVertical,
  39. TextDirection? textDirection,
  40. bool readOnly = false,
  41. EditableTextContextMenuBuilder? contextMenuBuilder,
  42. bool? showCursor,
  43. bool autofocus = false,
  44. String obscuringCharacter = '•',
  45. bool obscureText = false,
  46. bool autocorrect = true,
  47. bool enableSuggestions = true,
  48. int? maxLines = 1,
  49. int? minLines,
  50. bool expands = false,
  51. int? maxLength,
  52. MaxLengthEnforcement? maxLengthEnforcement,
  53. ValueChanged<String>? onChanged,
  54. VoidCallback? onEditingComplete,
  55. ValueChanged<String>? onSubmitted,
  56. AppPrivateCommandCallback? onAppPrivateCommand,
  57. List<TextInputFormatter>? inputFormatters,
  58. bool? enabled = true,
  59. double cursorWidth = 2.0,
  60. double? cursorHeight,
  61. Radius? cursorRadius,
  62. Color? cursorColor,
  63. Brightness? keyboardAppearance,
  64. EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
  65. TextSelectionControls? selectionControls,
  66. GestureTapCallback? onTap,
  67. MouseCursor? mouseCursor,
  68. InputCounterWidgetBuilder? buildCounter,
  69. ScrollController? scrollController,
  70. ScrollPhysics? scrollPhysics,
  71. Iterable<String>? autofillHints = const <String>[],
  72. Clip clipBehavior = Clip.hardEdge,
  73. String? restorationId,
  74. bool scribbleEnabled = true,
  75. bool enableInteractiveSelection = true,
  76. bool enableIMEPersonalizedLearning = true,
  77. Widget? icon,
  78. Color? iconColor,
  79. Widget? label,
  80. String? labelText,
  81. TextStyle? labelStyle,
  82. TextStyle? floatingLabelStyle,
  83. String? helperText,
  84. TextStyle? helperStyle,
  85. int? helperMaxLines,
  86. String? hintText,
  87. TextStyle? hintStyle = const TextStyle(fontSize: 14, color: Color(0xff999999)),
  88. TextDirection? hintTextDirection,
  89. int? hintMaxLines,
  90. String? errorText,
  91. TextStyle? errorStyle,
  92. int? errorMaxLines,
  93. FloatingLabelBehavior? floatingLabelBehavior,
  94. FloatingLabelAlignment? floatingLabelAlignment,
  95. bool isCollapsed = true,
  96. bool? isDense,
  97. EdgeInsetsGeometry? contentPadding = const EdgeInsets.fromLTRB(10.0, 15.0, 10.0, 15.0),
  98. Widget? prefixIcon,
  99. BoxConstraints? prefixIconConstraints,
  100. Widget? prefix,
  101. String? prefixText,
  102. TextStyle? prefixStyle,
  103. Color? prefixIconColor,
  104. Widget? suffixIcon,
  105. Widget? suffix,
  106. String? suffixText,
  107. TextStyle? suffixStyle,
  108. Color? suffixIconColor,
  109. BoxConstraints? suffixIconConstraints,
  110. Widget? counter,
  111. String? counterText,
  112. TextStyle? counterStyle,
  113. bool? filled = true,
  114. Color? fillColor = Colors.transparent,
  115. Color? focusColor,
  116. Color? hoverColor = Colors.transparent,
  117. InputBorder? errorBorder,
  118. InputBorder? focusedBorder,
  119. InputBorder? focusedErrorBorder,
  120. InputBorder? disabledBorder,
  121. InputBorder? enabledBorder,
  122. InputBorder? border = const OutlineInputBorder(borderSide: BorderSide.none),
  123. String? semanticCounterText,
  124. bool? alignLabelWithHint,
  125. BoxConstraints? constraints,
  126. ValueChanged<String>? onFieldSubmitted,
  127. FormFieldSetter<String>? onSaved,
  128. FormFieldValidator<String>? validator,
  129. MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
  130. MainAxisSize mainAxisSize = MainAxisSize.min,
  131. CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
  132. Key? key,
})

Implementation

const InputText(
    {
      required this.controller,
      this.inputController,
      this.inline = InlineStyle.clearStyle,
      this.title,
      this.noBorder = false,
      this.bgRadius = 10,
      this.enableForm = false,
      this.enableClear = true,
      this.fixClearIcon = false,
      this.clearIcon =  const Icon(Icons.cancel,size: 20,color: Colors.grey),
      this.clearBuilder,
      this.allLineBorder = const OutlineInputBorder(
          gapPadding: 0,
          borderRadius: BorderRadius.all(Radius.circular(10)),
          borderSide: BorderSide(color: Colors.transparent, width: 0)),
      this.width,
      this.padding,
      this.margin,
      this.alignment = Alignment.centerLeft,

      this.buildPop,
      this.onFocusShowPop = false,
      this.focusListener,
      this.popBox,
      this.marginTop = 0,
      this.popElevation = 0.0,
      this.popColor = Colors.transparent,
      this.popShadowColor,
      this.popSurfaceTintColor,
      this.popChildTextStyle,
      this.popBorderRadius,
      this.popShape,
      this.cursorEnd = false,
      this.focusNode,
      this.decoration,
      this.keyboardType = TextInputType.text,
      this.textInputAction = TextInputAction.done,
      this.textCapitalization = TextCapitalization.none,
      this.style = const TextStyle(fontSize: 14, color:Color(0xff222222)),
      this.strutStyle,
      this.textAlign = TextAlign.start,
      this.textAlignVertical,
      this.textDirection,
      this.readOnly = false,
      this.contextMenuBuilder,
      this.showCursor,
      this.autofocus = false,
      this.obscuringCharacter = '•',
      this.obscureText = false,
      this.autocorrect = true,
      this.enableSuggestions = true,
      this.maxLines = 1,
      this.minLines,
      this.expands = false,
      this.maxLength,
      this.maxLengthEnforcement,
      this.onChanged,
      this.onEditingComplete,
      this.onSubmitted,
      this.onAppPrivateCommand,
      this.inputFormatters,
      this.enabled = true,
      this.cursorWidth = 2.0,
      this.cursorHeight,
      this.cursorRadius,
      this.cursorColor,
      this.keyboardAppearance,
      this.scrollPadding = const EdgeInsets.all(20.0),
      this.selectionControls,
      this.onTap,
      this.mouseCursor,
      this.buildCounter,
      this.scrollController,
      this.scrollPhysics,
      this.autofillHints = const <String>[],
      this.clipBehavior = Clip.hardEdge,
      this.restorationId,
      this.scribbleEnabled = true,
      this.enableInteractiveSelection = true,
      this.enableIMEPersonalizedLearning = true,
      this.icon,
      this.iconColor,
      this.label,
      this.labelText,
      this.labelStyle,
      this.floatingLabelStyle,
      this.helperText,
      this.helperStyle,
      this.helperMaxLines,
      this.hintText,
      this.hintStyle = const TextStyle(fontSize: 14, color: Color(0xff999999)),
      this.hintTextDirection,
      this.hintMaxLines,
      this.errorText,
      this.errorStyle,
      this.errorMaxLines,
      this.floatingLabelBehavior,
      this.floatingLabelAlignment,
      this.isCollapsed = true,
      this.isDense,
      this.contentPadding = const EdgeInsets.fromLTRB(10.0, 15.0, 10.0, 15.0),
      this.prefixIcon,
      this.prefixIconConstraints,
      this.prefix,
      this.prefixText,
      this.prefixStyle,
      this.prefixIconColor,
      this.suffixIcon,
      this.suffix,
      this.suffixText,
      this.suffixStyle,
      this.suffixIconColor,
      this.suffixIconConstraints,
      this.counter,
      this.counterText,
      this.counterStyle,
      this.filled = true,
      this.fillColor = Colors.transparent,
      this.focusColor,
      this.hoverColor =  Colors.transparent,
      this.errorBorder,
      this.focusedBorder,
      this.focusedErrorBorder,
      this.disabledBorder,
      this.enabledBorder,
      this.border = const OutlineInputBorder(borderSide: BorderSide.none),
      this.semanticCounterText,
      this.alignLabelWithHint,
      this.constraints,
      this.onFieldSubmitted,
      this.onSaved,
      this.validator,
      // this.initialValue,
      this.mainAxisAlignment = MainAxisAlignment.start,
      this.mainAxisSize = MainAxisSize.min,
      this.crossAxisAlignment = CrossAxisAlignment.center,
      Key? key})
    : super(key: key);