InputText constructor
const
InputText({
- required TextEditingController? controller,
- InputController? inputController,
- InlineStyle inline = InlineStyle.clearStyle,
- Widget? title,
- bool noBorder = false,
- double bgRadius = 10,
- bool enableForm = false,
- bool enableClear = true,
- bool fixClearIcon = false,
- Widget? clearIcon = const Icon(Icons.cancel, size: 20, color: Colors.grey),
- ClearBuilder? clearBuilder,
- InputBorder? allLineBorder = const OutlineInputBorder(gapPadding: 0, borderRadius: BorderRadius.all(Radius.circular(10)), borderSide: BorderSide(color: Colors.transparent, width: 0)),
- double? width,
- EdgeInsetsGeometry? padding,
- EdgeInsetsGeometry? margin,
- AlignmentGeometry? alignment = Alignment.centerLeft,
- BuildPop? buildPop,
- bool onFocusShowPop = false,
- FocusListener? focusListener,
- PopBox? popBox,
- double marginTop = 0,
- double? popElevation = 0.0,
- Color? popColor = Colors.transparent,
- Color? popShadowColor,
- Color? popSurfaceTintColor,
- TextStyle? popChildTextStyle,
- BorderRadiusGeometry? popBorderRadius,
- ShapeBorder? popShape,
- bool cursorEnd = false,
- FocusNode? focusNode,
- InputDecoration? decoration,
- TextInputType? keyboardType = TextInputType.text,
- TextInputAction? textInputAction = TextInputAction.done,
- TextCapitalization textCapitalization = TextCapitalization.none,
- TextStyle? style = const TextStyle(fontSize: 14, color: Color(0xff222222)),
- StrutStyle? strutStyle,
- TextAlign textAlign = TextAlign.start,
- TextAlignVertical? textAlignVertical,
- TextDirection? textDirection,
- bool readOnly = false,
- ToolbarOptions? toolbarOptions,
- bool? showCursor,
- bool autofocus = false,
- String obscuringCharacter = '•',
- bool obscureText = false,
- bool autocorrect = true,
- bool enableSuggestions = true,
- int? maxLines = 1,
- int? minLines,
- bool expands = false,
- int? maxLength,
- MaxLengthEnforcement? maxLengthEnforcement,
- ValueChanged<
String> ? onChanged, - VoidCallback? onEditingComplete,
- ValueChanged<
String> ? onSubmitted, - AppPrivateCommandCallback? onAppPrivateCommand,
- List<
TextInputFormatter> ? inputFormatters, - bool? enabled = true,
- double cursorWidth = 2.0,
- double? cursorHeight,
- Radius? cursorRadius,
- Color? cursorColor,
- Brightness? keyboardAppearance,
- EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
- TextSelectionControls? selectionControls,
- GestureTapCallback? onTap,
- MouseCursor? mouseCursor,
- InputCounterWidgetBuilder? buildCounter,
- ScrollController? scrollController,
- ScrollPhysics? scrollPhysics,
- Iterable<
String> ? autofillHints = const <String>[], - Clip clipBehavior = Clip.hardEdge,
- String? restorationId,
- bool scribbleEnabled = true,
- bool enableInteractiveSelection = true,
- bool enableIMEPersonalizedLearning = true,
- Widget? icon,
- Color? iconColor,
- Widget? label,
- String? labelText,
- TextStyle? labelStyle,
- TextStyle? floatingLabelStyle,
- String? helperText,
- TextStyle? helperStyle,
- int? helperMaxLines,
- String? hintText,
- TextStyle? hintStyle = const TextStyle(fontSize: 14, color: Color(0xff999999)),
- TextDirection? hintTextDirection,
- int? hintMaxLines,
- String? errorText,
- TextStyle? errorStyle,
- int? errorMaxLines,
- FloatingLabelBehavior? floatingLabelBehavior,
- FloatingLabelAlignment? floatingLabelAlignment,
- bool isCollapsed = true,
- bool? isDense,
- EdgeInsetsGeometry? contentPadding = const EdgeInsets.fromLTRB(10.0, 15.0, 10.0, 15.0),
- Widget? prefixIcon,
- BoxConstraints? prefixIconConstraints,
- Widget? prefix,
- String? prefixText,
- TextStyle? prefixStyle,
- Color? prefixIconColor,
- Widget? suffixIcon,
- Widget? suffix,
- String? suffixText,
- TextStyle? suffixStyle,
- Color? suffixIconColor,
- BoxConstraints? suffixIconConstraints,
- Widget? counter,
- String? counterText,
- TextStyle? counterStyle,
- bool? filled = true,
- Color? fillColor = Colors.transparent,
- Color? focusColor,
- Color? hoverColor = Colors.transparent,
- InputBorder? errorBorder,
- InputBorder? focusedBorder,
- InputBorder? focusedErrorBorder,
- InputBorder? disabledBorder,
- InputBorder? enabledBorder,
- InputBorder? border = const OutlineInputBorder(borderSide: BorderSide.none),
- String? semanticCounterText,
- bool? alignLabelWithHint,
- BoxConstraints? constraints,
- ValueChanged<
String> ? onFieldSubmitted, - FormFieldSetter<
String> ? onSaved, - FormFieldValidator<
String> ? validator, - MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
- MainAxisSize mainAxisSize = MainAxisSize.min,
- CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
- 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.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.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);