FTextField.multiline constructor

const FTextField.multiline({
  1. FTextFieldStyle? style,
  2. ValueWidgetBuilder<(FTextFieldStyle, Set<WidgetState>)> builder = Defaults.builder,
  3. Widget? label,
  4. String? hint,
  5. Widget? description,
  6. Widget? error,
  7. TextMagnifierConfiguration? magnifierConfiguration,
  8. Object groupId = EditableText,
  9. TextEditingController? controller,
  10. FocusNode? focusNode,
  11. TextInputType? keyboardType,
  12. TextInputAction? textInputAction,
  13. TextCapitalization textCapitalization = TextCapitalization.sentences,
  14. TextAlign textAlign = TextAlign.start,
  15. TextAlignVertical? textAlignVertical,
  16. TextDirection? textDirection,
  17. bool autofocus = false,
  18. WidgetStatesController? statesController,
  19. String obscuringCharacter = '•',
  20. bool obscureText = false,
  21. bool autocorrect = true,
  22. SmartDashesType? smartDashesType,
  23. SmartQuotesType? smartQuotesType,
  24. bool enableSuggestions = true,
  25. int? minLines = 4,
  26. int? maxLines,
  27. bool expands = false,
  28. bool readOnly = false,
  29. bool? showCursor,
  30. int? maxLength,
  31. MaxLengthEnforcement? maxLengthEnforcement,
  32. ValueChanged<String>? onChange,
  33. GestureTapCallback? onTap,
  34. TapRegionCallback? onTapOutside,
  35. bool onTapAlwaysCalled = false,
  36. VoidCallback? onEditingComplete,
  37. ValueChanged<String>? onSubmit,
  38. AppPrivateCommandCallback? onAppPrivateCommand,
  39. List<TextInputFormatter>? inputFormatters,
  40. bool enabled = true,
  41. bool? ignorePointers,
  42. bool enableInteractiveSelection = true,
  43. TextSelectionControls? selectionControls,
  44. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  45. MouseCursor? mouseCursor,
  46. FTextFieldCounterBuilder? counterBuilder,
  47. ScrollPhysics? scrollPhysics,
  48. ScrollController? scrollController,
  49. Iterable<String>? autofillHints,
  50. String? restorationId,
  51. bool stylusHandwritingEnabled = true,
  52. bool enableIMEPersonalizedLearning = true,
  53. ContentInsertionConfiguration? contentInsertionConfiguration,
  54. EditableTextContextMenuBuilder? contextMenuBuilder = Defaults.contextMenuBuilder,
  55. bool canRequestFocus = true,
  56. UndoHistoryController? undoController,
  57. SpellCheckConfiguration? spellCheckConfiguration,
  58. ValueWidgetBuilder<(FTextFieldStyle, Set<WidgetState>)>? prefixBuilder,
  59. ValueWidgetBuilder<(FTextFieldStyle, Set<WidgetState>)>? suffixBuilder,
  60. bool clearable(
    1. TextEditingValue
    ) = Defaults.clearable,
  61. String? initialText,
  62. Key? key,
})

Creates a FTextField configured for multiline inputs.

The text field's height can be configured by adjusting minLines. By default, the text field will expand every time a new line is added. To limit the maximum height of the text field and make it scrollable, consider setting maxLines.

Implementation

const FTextField.multiline({
  this.style,
  this.builder = Defaults.builder,
  this.label,
  this.hint,
  this.description,
  this.error,
  this.magnifierConfiguration,
  this.groupId = EditableText,
  this.controller,
  this.focusNode,
  this.keyboardType,
  this.textInputAction,
  this.textCapitalization = TextCapitalization.sentences,
  this.textAlign = TextAlign.start,
  this.textAlignVertical,
  this.textDirection,
  this.autofocus = false,
  this.statesController,
  this.obscuringCharacter = '•',
  this.obscureText = false,
  this.autocorrect = true,
  this.smartDashesType,
  this.smartQuotesType,
  this.enableSuggestions = true,
  this.minLines = 4,
  this.maxLines,
  this.expands = false,
  this.readOnly = false,
  this.showCursor,
  this.maxLength,
  this.maxLengthEnforcement,
  this.onChange,
  this.onTap,
  this.onTapOutside,
  this.onTapAlwaysCalled = false,
  this.onEditingComplete,
  this.onSubmit,
  this.onAppPrivateCommand,
  this.inputFormatters,
  this.enabled = true,
  this.ignorePointers,
  this.enableInteractiveSelection = true,
  this.selectionControls,
  this.dragStartBehavior = DragStartBehavior.start,
  this.mouseCursor,
  this.counterBuilder,
  this.scrollPhysics,
  this.scrollController,
  this.autofillHints,
  this.restorationId,
  this.stylusHandwritingEnabled = true,
  this.enableIMEPersonalizedLearning = true,
  this.contentInsertionConfiguration,
  this.contextMenuBuilder = Defaults.contextMenuBuilder,
  this.canRequestFocus = true,
  this.undoController,
  this.spellCheckConfiguration,
  this.prefixBuilder,
  this.suffixBuilder,
  this.clearable = Defaults.clearable,
  this.initialText,
  super.key,
}) : assert(
       controller == null || initialText == null,
       'Cannot provide both a controller and an initialText. '
       'To fix, set the initial text directly in the controller.',
     );