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()?,
  17. void onSubmitted(
    1. String
    )?,
  18. List<TextInputFormatter>? inputFormatters,
  19. bool? enabled,
  20. double? cursorWidth,
  21. Radius? cursorRadius,
  22. Color? cursorColor,
  23. Brightness? keyboardAppearance,
  24. EdgeInsets? scrollPadding,
  25. DragStartBehavior? dragStartBehavior,
  26. int? minLines,
  27. bool? expands,
  28. ScrollPhysics? scrollPhysics,
  29. StrutStyle? strutStyle,
  30. bool? enableInteractiveSelection,
  31. ScrollController? scrollController,
  32. GestureTapCallback? onTap,
  33. bool? readOnly,
  34. bool? showCursor,
  35. TextAlignVertical? textAlignVertical,
  36. ToolbarOptions? toolbarOptions,
  37. SmartDashesType? smartDashesType,
  38. SmartQuotesType? smartQuotesType,
  39. BoxHeightStyle? selectionHeightStyle,
  40. BoxWidthStyle? selectionWidthStyle,
  41. String? obscuringCharacter,
  42. Iterable<String>? autofillHints,
  43. double? cursorHeight,
  44. String? restorationId,
  45. MaxLengthEnforcement? maxLengthEnforcement,
  46. TextSelectionControls? selectionControls,
  47. String? hintText,
  48. bool? enableIMEPersonalizedLearning,
  49. bool makeCupertinoDecorationNull = false,
  50. Clip clipBehavior = Clip.hardEdge,
  51. bool scribbleEnabled = true,
  52. PlatformBuilder<MaterialTextFieldData>? material,
  53. 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,
  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.toolbarOptions,
  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.material,
  this.cupertino,
}) : keyboardType = keyboardType ??
          (maxLines == 1 ? TextInputType.text : TextInputType.multiline);