CellTextField constructor
const
CellTextField({
- Key? key,
- required MutableCell<
String> content, - MutableCell<
TextSelection> ? selection, - ValueCell<
FocusNode?> ? focusNode, - ValueCell<
InputDecoration?> decoration = const ValueCell.value(InputDecoration()), - ValueCell<
TextInputType?> ? keyboardType, - ValueCell<
TextInputAction?> ? textInputAction, - ValueCell<
TextCapitalization> textCapitalization = const ValueCell.value(TextCapitalization.none), - ValueCell<
TextStyle?> ? style, - ValueCell<
StrutStyle?> ? strutStyle, - ValueCell<
TextAlign> textAlign = const ValueCell.value(TextAlign.start), - ValueCell<
TextAlignVertical?> ? textAlignVertical, - ValueCell<
TextDirection?> ? textDirection, - ValueCell<
bool> readOnly = const ValueCell.value(false), - ValueCell<
ToolbarOptions?> ? toolbarOptions, - ValueCell<
bool?> ? showCursor, - ValueCell<
bool> autofocus = const ValueCell.value(false), - ValueCell<
String> obscuringCharacter = const ValueCell.value('•'), - ValueCell<
bool> obscureText = const ValueCell.value(false), - ValueCell<
bool> autocorrect = const ValueCell.value(true), - ValueCell<
SmartDashesType?> ? smartDashesType, - ValueCell<
SmartQuotesType?> ? smartQuotesType, - ValueCell<
bool> enableSuggestions = const ValueCell.value(true), - ValueCell<
int?> maxLines = const ValueCell.value(1), - ValueCell<
int?> ? minLines, - ValueCell<
bool> expands = const ValueCell.value(false), - ValueCell<
int?> ? maxLength, - ValueCell<
MaxLengthEnforcement?> ? maxLengthEnforcement, - ValueCell<
void Function()?> ? onEditingComplete, - ValueCell<
void Function(String)?> ? onSubmitted, - ValueCell<
void Function(String, Map< ? onAppPrivateCommand,String, dynamic> )?> - ValueCell<
List< ? inputFormatters,TextInputFormatter> ?> - ValueCell<
bool?> ? enabled, - ValueCell<
double> cursorWidth = const ValueCell.value(2.0), - ValueCell<
double?> ? cursorHeight, - ValueCell<
Radius?> ? cursorRadius, - ValueCell<
bool?> ? cursorOpacityAnimates, - ValueCell<
Color?> ? cursorColor, - ValueCell<
BoxHeightStyle> selectionHeightStyle = const ValueCell.value(BoxHeightStyle.tight), - ValueCell<
BoxWidthStyle> selectionWidthStyle = const ValueCell.value(BoxWidthStyle.tight), - ValueCell<
Brightness?> ? keyboardAppearance, - ValueCell<
EdgeInsets> scrollPadding = const ValueCell.value(EdgeInsets.all(20.0)), - ValueCell<
DragStartBehavior> dragStartBehavior = const ValueCell.value(DragStartBehavior.start), - ValueCell<
bool?> ? enableInteractiveSelection, - ValueCell<
TextSelectionControls?> ? selectionControls, - ValueCell<
void Function()?> ? onTap, - ValueCell<
void Function(PointerDownEvent)?> ? onTapOutside, - ValueCell<
MouseCursor?> ? mouseCursor, - ValueCell<
InputCounterWidgetBuilder?> ? buildCounter, - ValueCell<
ScrollPhysics?> ? scrollPhysics, - ValueCell<
Iterable< autofillHints = const ValueCell.value(<String>[]),String> ?> - ValueCell<
ContentInsertionConfiguration?> ? contentInsertionConfiguration, - ValueCell<
Clip> clipBehavior = const ValueCell.value(Clip.hardEdge), - ValueCell<
String?> ? restorationId, - ValueCell<
bool> scribbleEnabled = const ValueCell.value(true), - ValueCell<
bool> enableIMEPersonalizedLearning = const ValueCell.value(true), - ValueCell<
bool> canRequestFocus = const ValueCell.value(true), - ValueCell<
SpellCheckConfiguration?> ? spellCheckConfiguration, - ValueCell<
TextMagnifierConfiguration?> ? magnifierConfiguration,
Create a CellTextField.
The only required parameter is content
which is a MutableCell to which
the content of the text field is bound. Whenever the cell's value changes
the content is updated to reflect the cell value, and similarly when
the content of the text field is changed, the cell's value is updated to
reflect content.
The text selection is bound to the cell selection
if it is given. This
means when the selection is changed by the user, the value of selection
is updated to reflect the selection. When the value of selection
is
changed, the selection in the text field is updated to reflect the value
of selection
.
The remaining parameters are the same as in the constructor of TextField.
Implementation
const CellTextField({
super.key,
required this.content,
this.selection,
this.focusNode,
this.decoration = const ValueCell.value(InputDecoration()),
this.keyboardType,
this.textInputAction,
this.textCapitalization = const ValueCell.value(TextCapitalization.none),
this.style,
this.strutStyle,
this.textAlign = const ValueCell.value(TextAlign.start),
this.textAlignVertical,
this.textDirection,
this.readOnly = const ValueCell.value(false),
this.toolbarOptions,
this.showCursor,
this.autofocus = const ValueCell.value(false),
this.obscuringCharacter = const ValueCell.value('•'),
this.obscureText = const ValueCell.value(false),
this.autocorrect = const ValueCell.value(true),
this.smartDashesType,
this.smartQuotesType,
this.enableSuggestions = const ValueCell.value(true),
this.maxLines = const ValueCell.value(1),
this.minLines,
this.expands = const ValueCell.value(false),
this.maxLength,
this.maxLengthEnforcement,
this.onEditingComplete,
this.onSubmitted,
this.onAppPrivateCommand,
this.inputFormatters,
this.enabled,
this.cursorWidth = const ValueCell.value(2.0),
this.cursorHeight,
this.cursorRadius,
this.cursorOpacityAnimates,
this.cursorColor,
this.selectionHeightStyle = const ValueCell.value(BoxHeightStyle.tight),
this.selectionWidthStyle = const ValueCell.value(BoxWidthStyle.tight),
this.keyboardAppearance,
this.scrollPadding = const ValueCell.value(EdgeInsets.all(20.0)),
this.dragStartBehavior = const ValueCell.value(DragStartBehavior.start),
this.enableInteractiveSelection,
this.selectionControls,
this.onTap,
this.onTapOutside,
this.mouseCursor,
this.buildCounter,
this.scrollPhysics,
this.autofillHints = const ValueCell.value(<String>[]),
this.contentInsertionConfiguration,
this.clipBehavior = const ValueCell.value(Clip.hardEdge),
this.restorationId,
this.scribbleEnabled = const ValueCell.value(true),
this.enableIMEPersonalizedLearning = const ValueCell.value(true),
this.canRequestFocus = const ValueCell.value(true),
this.spellCheckConfiguration,
this.magnifierConfiguration,
});