AdaptiveTextField constructor
AdaptiveTextField({
- Key? key,
- TextEditingController? controller,
- FocusNode? focusNode,
- InputDecoration decoration = const InputDecoration(),
- TextInputType? keyboardType,
- TextInputAction? textInputAction,
- TextCapitalization textCapitalization = TextCapitalization.none,
- TextStyle? style,
- StrutStyle? strutStyle,
- TextAlign textAlign = TextAlign.start,
- TextAlignVertical? textAlignVertical,
- TextDirection? textDirection,
- bool? showCursor,
- bool autofocus = false,
- bool obscureText = false,
- bool autocorrect = true,
- bool enableSuggestions = true,
- int? maxLines,
- int? minLines,
- bool expands = false,
- bool readOnly = false,
- ToolbarOptions? toolbarOptions,
- int? maxLength,
- ValueChanged<
String> ? onChanged, - VoidCallback? onEditingComplete,
- ValueChanged<
String> ? onSubmitted, - List<
TextInputFormatter> ? inputFormatters, - MaxLengthEnforcement maxLengthEnforement = MaxLengthEnforcement.none,
- bool? enabled,
- double cursorWidth = 2.0,
- Radius cursorRadius = const Radius.circular(2.0),
- Color? cursorColor,
- Brightness? keyboardAppearance,
- EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- bool enableInteractiveSelection = true,
- GestureTapCallback? onTap,
- InputCounterWidgetBuilder? buildCounter,
- ScrollPhysics? scrollPhysics,
- ScrollController? scrollController,
- BoxDecoration cupertinoDecoration = _kDefaultRoundedBorderDecoration,
- EdgeInsetsGeometry padding = const EdgeInsets.all(6.0),
- String? placeholder,
- TextStyle placeholderStyle = const TextStyle(fontWeight: FontWeight.w400, color: CupertinoColors.placeholderText),
- Widget? prefix,
- OverlayVisibilityMode prefixMode = OverlayVisibilityMode.always,
- Widget? suffix,
- OverlayVisibilityMode suffixMode = OverlayVisibilityMode.always,
- OverlayVisibilityMode clearButtonMode = OverlayVisibilityMode.never,
Implementation
AdaptiveTextField(
{Key? key,
this.controller,
this.focusNode,
this.decoration = const InputDecoration(),
this.keyboardType,
this.textInputAction,
this.textCapitalization = TextCapitalization.none,
this.style,
this.strutStyle,
this.textAlign = TextAlign.start,
this.textAlignVertical,
this.textDirection,
this.showCursor,
this.autofocus = false,
this.obscureText = false,
this.autocorrect = true,
this.enableSuggestions = true,
this.maxLines,
this.minLines,
this.expands = false,
this.readOnly = false,
this.toolbarOptions,
this.maxLength,
this.onChanged,
this.onEditingComplete,
this.onSubmitted,
this.inputFormatters,
this.maxLengthEnforement = MaxLengthEnforcement.none,
this.enabled,
this.cursorWidth = 2.0,
this.cursorRadius = const Radius.circular(2.0),
this.cursorColor,
this.keyboardAppearance,
this.scrollPadding = const EdgeInsets.all(20.0),
this.dragStartBehavior = DragStartBehavior.start,
this.enableInteractiveSelection = true,
this.onTap,
this.buildCounter,
this.scrollPhysics,
this.scrollController,
this.cupertinoDecoration = _kDefaultRoundedBorderDecoration,
this.padding = const EdgeInsets.all(6.0),
this.placeholder,
this.placeholderStyle = const TextStyle(
fontWeight: FontWeight.w400,
color: CupertinoColors.placeholderText,
),
this.prefix,
this.prefixMode = OverlayVisibilityMode.always,
this.suffix,
this.suffixMode = OverlayVisibilityMode.always,
this.clearButtonMode = OverlayVisibilityMode.never})
: super(key: key);