PlatformTextField constructor

PlatformTextField(
  1. {Key? key,
  2. Key? widgetKey,
  3. TextEditingController? controller,
  4. FocusNode? focusNode,
  5. TextInputType? keyboardType,
  6. TextInputAction? textInputAction,
  7. TextCapitalization? textCapitalization = TextCapitalization.none,
  8. TextStyle? style,
  9. TextAlign? textAlign,
  10. bool? autofocus,
  11. bool? obscureText,
  12. bool? autocorrect,
  13. int? maxLines = 1,
  14. int? maxLength,
  15. void onChanged(
    1. String
    )?,
  16. void onEditingComplete(
      )?,
    1. void onSubmitted(
      1. String
      )?,
    2. List<TextInputFormatter>? inputFormatters,
    3. bool enabled = true,
    4. double? cursorWidth,
    5. Radius? cursorRadius,
    6. Color? cursorColor,
    7. Brightness? keyboardAppearance,
    8. EdgeInsets? scrollPadding,
    9. DragStartBehavior? dragStartBehavior,
    10. int? minLines,
    11. bool? expands,
    12. ScrollPhysics? scrollPhysics,
    13. StrutStyle? strutStyle,
    14. bool? enableInteractiveSelection,
    15. ScrollController? scrollController,
    16. GestureTapCallback? onTap,
    17. bool? readOnly,
    18. bool? showCursor,
    19. TextAlignVertical? textAlignVertical,
    20. SmartDashesType? smartDashesType,
    21. SmartQuotesType? smartQuotesType,
    22. BoxHeightStyle? selectionHeightStyle,
    23. BoxWidthStyle? selectionWidthStyle,
    24. String? obscuringCharacter,
    25. Iterable<String>? autofillHints,
    26. double? cursorHeight,
    27. String? restorationId,
    28. MaxLengthEnforcement? maxLengthEnforcement,
    29. TextSelectionControls? selectionControls,
    30. String? hintText,
    31. bool? enableIMEPersonalizedLearning,
    32. bool makeCupertinoDecorationNull = false,
    33. Clip clipBehavior = Clip.hardEdge,
    34. bool scribbleEnabled = true,
    35. EditableTextContextMenuBuilder? contextMenuBuilder,
    36. TapRegionCallback? onTapOutside,
    37. SpellCheckConfiguration? spellCheckConfiguration,
    38. TextMagnifierConfiguration? magnifierConfiguration,
    39. ContentInsertionConfiguration? contentInsertionConfiguration,
    40. bool? cursorOpacityAnimates,
    41. UndoHistoryController? undoController,
    42. PlatformBuilder<MaterialTextFieldData>? material,
    43. PlatformBuilder<CupertinoTextFieldData>? cupertino}
    )

    Implementation

    PlatformTextField({
      super.key,
      this.widgetKey,
      this.controller,
      this.focusNode,
      TextInputType? keyboardType,
      this.textInputAction,
      this.textCapitalization = TextCapitalization.none,
      this.style,
      this.textAlign,
      this.autofocus,
      this.obscureText,
      this.autocorrect,
      this.maxLines = 1,
      this.maxLength,
      this.onChanged,
      this.onEditingComplete,
      this.onSubmitted,
      this.inputFormatters,
      this.enabled = true,
      this.cursorWidth,
      this.cursorRadius,
      this.cursorColor,
      this.keyboardAppearance,
      this.scrollPadding,
      this.dragStartBehavior,
      this.minLines,
      this.expands,
      this.scrollPhysics,
      this.strutStyle,
      this.enableInteractiveSelection,
      this.scrollController,
      this.onTap,
      this.readOnly,
      this.showCursor,
      this.textAlignVertical,
      this.smartDashesType,
      this.smartQuotesType,
      this.selectionHeightStyle,
      this.selectionWidthStyle,
      this.obscuringCharacter,
      this.autofillHints,
      this.cursorHeight,
      this.restorationId,
      this.maxLengthEnforcement,
      this.selectionControls,
      this.hintText,
      this.enableIMEPersonalizedLearning,
      this.makeCupertinoDecorationNull = false,
      this.clipBehavior = Clip.hardEdge,
      this.scribbleEnabled = true,
      this.contextMenuBuilder,
      this.onTapOutside,
      this.spellCheckConfiguration,
      this.magnifierConfiguration,
      this.contentInsertionConfiguration,
      this.cursorOpacityAnimates,
      this.undoController,
      this.material,
      this.cupertino,
    }) : keyboardType = keyboardType ??
              (maxLines == 1 ? TextInputType.text : TextInputType.multiline);