CellTextField class

A text field widget, similar to TextField, with content controlled by a ValueCell.

The content of the text field is controlled by a MutableCell which is passed on construction. Whenever the value of the cell changes, the content of the text field is updated to reflect the value of the cell. Similarly, whenever the content of the text field changes, the value of the cell is updated to reflect the field content.

Inheritance
Annotations
  • @Deprecated('Use LiveTextField from live_cells_ui instead.')

Constructors

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<String, dynamic>)?>? onAppPrivateCommand, ValueCell<List<TextInputFormatter>?>? inputFormatters, 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<String>?> autofillHints = const ValueCell.value(<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.
const

Properties

autocorrect ValueCell<bool>
final
autofillHints ValueCell<Iterable<String>?>
final
autofocus ValueCell<bool>
final
buildCounter ValueCell<InputCounterWidgetBuilder?>?
final
canRequestFocus ValueCell<bool>
final
clipBehavior ValueCell<Clip>
final
content MutableCell<String>
Content cell
final
contentInsertionConfiguration ValueCell<ContentInsertionConfiguration?>?
final
cursorColor ValueCell<Color?>?
final
cursorHeight ValueCell<double?>?
final
cursorOpacityAnimates ValueCell<bool?>?
final
cursorRadius ValueCell<Radius?>?
final
cursorWidth ValueCell<double>
final
decoration ValueCell<InputDecoration?>
final
dragStartBehavior ValueCell<DragStartBehavior>
final
enabled ValueCell<bool?>?
final
enableIMEPersonalizedLearning ValueCell<bool>
final
enableInteractiveSelection ValueCell<bool?>?
final
enableSuggestions ValueCell<bool>
final
expands ValueCell<bool>
final
focusNode ValueCell<FocusNode?>?
final
hashCode int
The hash code for this object.
no setterinherited
inputFormatters ValueCell<List<TextInputFormatter>?>?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyboardAppearance ValueCell<Brightness?>?
final
keyboardType ValueCell<TextInputType?>?
final
magnifierConfiguration ValueCell<TextMagnifierConfiguration?>?
final
maxLength ValueCell<int?>?
final
maxLengthEnforcement ValueCell<MaxLengthEnforcement?>?
final
maxLines ValueCell<int?>
final
minLines ValueCell<int?>?
final
mouseCursor ValueCell<MouseCursor?>?
final
obscureText ValueCell<bool>
final
obscuringCharacter ValueCell<String>
final
onAppPrivateCommand ValueCell<void Function(String, Map<String, dynamic>)?>?
final
onEditingComplete ValueCell<void Function()?>?
final
onSubmitted ValueCell<void Function(String)?>?
final
onTap ValueCell<void Function()?>?
final
onTapOutside ValueCell<void Function(PointerDownEvent)?>?
final
readOnly ValueCell<bool>
final
restorationId ValueCell<String?>?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scribbleEnabled ValueCell<bool>
final
scrollPadding ValueCell<EdgeInsets>
final
scrollPhysics ValueCell<ScrollPhysics?>?
final
selection MutableCell<TextSelection>?
Cell holding the text selection
final
selectionControls ValueCell<TextSelectionControls?>?
final
selectionHeightStyle ValueCell<BoxHeightStyle>
final
selectionWidthStyle ValueCell<BoxWidthStyle>
final
showCursor ValueCell<bool?>?
final
smartDashesType ValueCell<SmartDashesType?>?
final
smartQuotesType ValueCell<SmartQuotesType?>?
final
spellCheckConfiguration ValueCell<SpellCheckConfiguration?>?
final
strutStyle ValueCell<StrutStyle?>?
final
style ValueCell<TextStyle?>?
final
textAlign ValueCell<TextAlign>
final
textAlignVertical ValueCell<TextAlignVertical?>?
final
textCapitalization ValueCell<TextCapitalization>
final
textDirection ValueCell<TextDirection?>?
final
textInputAction ValueCell<TextInputAction?>?
final
toolbarOptions ValueCell<ToolbarOptions?>?
final

Methods

bind({MutableCell<String>? content, MutableCell<TextSelection>? selection, ValueCell<FocusNode?>? focusNode, ValueCell<InputDecoration?>? decoration, ValueCell<TextInputType?>? keyboardType, ValueCell<TextInputAction?>? textInputAction, ValueCell<TextCapitalization>? textCapitalization, ValueCell<TextStyle?>? style, ValueCell<StrutStyle?>? strutStyle, ValueCell<TextAlign>? textAlign, ValueCell<TextAlignVertical?>? textAlignVertical, ValueCell<TextDirection?>? textDirection, ValueCell<bool>? readOnly, ValueCell<ToolbarOptions?>? toolbarOptions, ValueCell<bool?>? showCursor, ValueCell<bool>? autofocus, ValueCell<String>? obscuringCharacter, ValueCell<bool>? obscureText, ValueCell<bool>? autocorrect, ValueCell<SmartDashesType?>? smartDashesType, ValueCell<SmartQuotesType?>? smartQuotesType, ValueCell<bool>? enableSuggestions, ValueCell<int?>? maxLines, ValueCell<int?>? minLines, ValueCell<bool>? expands, ValueCell<int?>? maxLength, ValueCell<MaxLengthEnforcement?>? maxLengthEnforcement, ValueCell<void Function()?>? onEditingComplete, ValueCell<void Function(String)?>? onSubmitted, ValueCell<void Function(String, Map<String, dynamic>)?>? onAppPrivateCommand, ValueCell<List<TextInputFormatter>?>? inputFormatters, ValueCell<bool?>? enabled, ValueCell<double>? cursorWidth, ValueCell<double?>? cursorHeight, ValueCell<Radius?>? cursorRadius, ValueCell<bool?>? cursorOpacityAnimates, ValueCell<Color?>? cursorColor, ValueCell<BoxHeightStyle>? selectionHeightStyle, ValueCell<BoxWidthStyle>? selectionWidthStyle, ValueCell<Brightness?>? keyboardAppearance, ValueCell<EdgeInsets>? scrollPadding, ValueCell<DragStartBehavior>? dragStartBehavior, 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<String>?>? autofillHints, ValueCell<ContentInsertionConfiguration?>? contentInsertionConfiguration, ValueCell<Clip>? clipBehavior, ValueCell<String?>? restorationId, ValueCell<bool>? scribbleEnabled, ValueCell<bool>? enableIMEPersonalizedLearning, ValueCell<bool>? canRequestFocus, ValueCell<SpellCheckConfiguration?>? spellCheckConfiguration, ValueCell<TextMagnifierConfiguration?>? magnifierConfiguration}) CellTextField
createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<CellTextField>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited