PersistedTextField constructor

const PersistedTextField({
  1. required String uniqueId,
  2. required TextEditingController controller,
  3. required ValueNotifier<bool> saveTriggerNotifier,
  4. Color dropdownBackgroundColor = Colors.white,
  5. GlobalKey<FormState>? formKey,
  6. String? initialValue,
  7. InputDecoration? decoration,
  8. TextInputType? keyboardType,
  9. TextCapitalization textCapitalization = TextCapitalization.none,
  10. TextInputAction? textInputAction,
  11. TextStyle? style,
  12. StrutStyle? strutStyle,
  13. TextDirection? textDirection,
  14. TextAlign textAlign = TextAlign.start,
  15. TextAlignVertical? textAlignVertical,
  16. bool autofocus = false,
  17. bool readOnly = false,
  18. EditableTextContextMenuBuilder? contextMenuBuilder,
  19. MouseCursor? mouseCursor,
  20. TapRegionCallback? onTapOutside,
  21. bool? showCursor,
  22. String obscuringCharacter = '•',
  23. bool obscureText = false,
  24. bool autocorrect = true,
  25. SmartDashesType? smartDashesType,
  26. SmartQuotesType? smartQuotesType,
  27. bool enableSuggestions = true,
  28. MaxLengthEnforcement? maxLengthEnforcement,
  29. int? maxLines = 1,
  30. int? minLines,
  31. bool expands = false,
  32. int? maxLength,
  33. ValueChanged<String>? onChanged,
  34. GestureTapCallback? onTap,
  35. VoidCallback? onEditingComplete,
  36. ValueChanged<String>? onFieldSubmitted,
  37. FormFieldSetter<String>? onSaved,
  38. FormFieldValidator<String>? validator,
  39. List<TextInputFormatter>? inputFormatters,
  40. bool? enabled,
  41. double cursorWidth = 2.0,
  42. double? cursorHeight,
  43. Radius? cursorRadius,
  44. Color? cursorColor,
  45. Brightness? keyboardAppearance,
  46. EdgeInsets scrollPadding = const EdgeInsets.all(30),
  47. bool enableInteractiveSelection = true,
  48. TextSelectionControls? selectionControls,
  49. InputCounterWidgetBuilder? buildCounter,
  50. ScrollPhysics? scrollPhysics,
  51. Iterable<String>? autofillHints,
  52. AutovalidateMode? autovalidateMode,
  53. ScrollController? scrollController,
  54. String? restorationId,
  55. bool enableIMEPersonalizedLearning = true,
  56. bool greyWhenDisabled = true,
  57. bool canRequestFocus = true,
  58. Clip clipBehavior = Clip.hardEdge,
  59. ContentInsertionConfiguration? contentInsertionConfiguration,
  60. bool? cursorOpacityAnimates,
  61. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  62. TextMagnifierConfiguration? magnifierConfiguration,
  63. AppPrivateCommandCallback? onAppPrivateCommand,
  64. ValueChanged<String>? onSubmitted,
  65. bool scribbleEnabled = true,
  66. BoxHeightStyle selectionHeightStyle = BoxHeightStyle.tight,
  67. BoxWidthStyle selectionWidthStyle = BoxWidthStyle.tight,
  68. SpellCheckConfiguration? spellCheckConfiguration,
  69. UndoHistoryController? undoController,
  70. PersistedInputCubit? persistentCubit,
  71. Key? key,
})

Default constructor

Implementation

const PersistedTextField({
  required this.uniqueId,
  required this.controller,

  /// You provide a bool notifier, when it becomes true,
  /// save value is triggered
  required this.saveTriggerNotifier,
  this.dropdownBackgroundColor = Colors.white,
  this.formKey,
  this.initialValue,
  this.decoration,
  this.keyboardType,
  this.textCapitalization = TextCapitalization.none,
  this.textInputAction,
  this.style,
  this.strutStyle,
  this.textDirection,
  this.textAlign = TextAlign.start,
  this.textAlignVertical,
  this.autofocus = false,
  this.readOnly = false,
  this.contextMenuBuilder,
  this.mouseCursor,
  this.onTapOutside,
  this.showCursor,
  this.obscuringCharacter = '•',
  this.obscureText = false,
  this.autocorrect = true,
  this.smartDashesType,
  this.smartQuotesType,
  this.enableSuggestions = true,
  this.maxLengthEnforcement,
  this.maxLines = 1,
  this.minLines,
  this.expands = false,
  this.maxLength,
  this.onChanged,
  this.onTap,
  this.onEditingComplete,
  this.onFieldSubmitted,
  this.onSaved,
  this.validator,
  this.inputFormatters,
  this.enabled,
  this.cursorWidth = 2.0,
  this.cursorHeight,
  this.cursorRadius,
  this.cursorColor,
  this.keyboardAppearance,
  this.scrollPadding = const EdgeInsets.all(30),
  this.enableInteractiveSelection = true,
  this.selectionControls,
  this.buildCounter,
  this.scrollPhysics,
  this.autofillHints,
  this.autovalidateMode,
  this.scrollController,
  this.restorationId,
  this.enableIMEPersonalizedLearning = true,
  this.greyWhenDisabled = true,
  this.canRequestFocus = true,
  this.clipBehavior = Clip.hardEdge,
  this.contentInsertionConfiguration,
  this.cursorOpacityAnimates,
  this.dragStartBehavior = DragStartBehavior.start,
  this.magnifierConfiguration,
  this.onAppPrivateCommand,
  this.onSubmitted,
  this.scribbleEnabled = true,
  this.selectionHeightStyle = BoxHeightStyle.tight,
  this.selectionWidthStyle = BoxWidthStyle.tight,
  this.spellCheckConfiguration,
  this.undoController,
  this.persistentCubit,
  super.key,
});