InputText constructor

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

Implementation

const InputText(
    {
      this.inline = InlineStyle.clearStyle,
      this.title,
      this.noBorder = false,
      this.bgRadius = 10,
      this.enableForm = false,
      this.enableClear = true,
      this.clearIcon = const Icon(
        Icons.cancel,
        size: 20.0,
        color: Colors.grey,
      ),
      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,
      required this.controller,
      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.toolbarOptions,
      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.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,
      this.semanticCounterText,
      this.alignLabelWithHint,
      this.constraints,
      this.onFieldSubmitted,
      this.onSaved,
      this.validator,
      // this.initialValue,
      Key? key})
    : super(key: key);