PersistedTextField class
TextField that prompts auto-filled values based on previous inputs, also has favorite inputs.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- PersistedTextField
Constructors
-
PersistedTextField({required String uniqueId, required TextEditingController controller, required ValueNotifier<
bool> saveTriggerNotifier, Color dropdownBackgroundColor = Colors.white, GlobalKey<FormState> ? formKey, String? initialValue, InputDecoration? decoration, TextInputType? keyboardType, TextCapitalization textCapitalization = TextCapitalization.none, TextInputAction? textInputAction, TextStyle? style, StrutStyle? strutStyle, TextDirection? textDirection, TextAlign textAlign = TextAlign.start, TextAlignVertical? textAlignVertical, bool autofocus = false, bool readOnly = false, EditableTextContextMenuBuilder? contextMenuBuilder, MouseCursor? mouseCursor, TapRegionCallback? onTapOutside, bool? showCursor, String obscuringCharacter = '•', bool obscureText = false, bool autocorrect = true, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, bool enableSuggestions = true, MaxLengthEnforcement? maxLengthEnforcement, int? maxLines = 1, int? minLines, bool expands = false, int? maxLength, ValueChanged<String> ? onChanged, GestureTapCallback? onTap, VoidCallback? onEditingComplete, ValueChanged<String> ? onFieldSubmitted, FormFieldSetter<String> ? onSaved, FormFieldValidator<String> ? validator, List<TextInputFormatter> ? inputFormatters, bool? enabled, double cursorWidth = 2.0, double? cursorHeight, Radius? cursorRadius, Color? cursorColor, Brightness? keyboardAppearance, EdgeInsets scrollPadding = const EdgeInsets.all(30), bool enableInteractiveSelection = true, TextSelectionControls? selectionControls, InputCounterWidgetBuilder? buildCounter, ScrollPhysics? scrollPhysics, Iterable<String> ? autofillHints, AutovalidateMode? autovalidateMode, ScrollController? scrollController, String? restorationId, bool enableIMEPersonalizedLearning = true, bool greyWhenDisabled = true, bool canRequestFocus = true, Clip clipBehavior = Clip.hardEdge, ContentInsertionConfiguration? contentInsertionConfiguration, bool? cursorOpacityAnimates, DragStartBehavior dragStartBehavior = DragStartBehavior.start, TextMagnifierConfiguration? magnifierConfiguration, AppPrivateCommandCallback? onAppPrivateCommand, ValueChanged<String> ? onSubmitted, bool scribbleEnabled = true, BoxHeightStyle selectionHeightStyle = BoxHeightStyle.tight, BoxWidthStyle selectionWidthStyle = BoxWidthStyle.tight, SpellCheckConfiguration? spellCheckConfiguration, UndoHistoryController? undoController, PersistedInputCubit? persistentCubit, Key? key}) -
Default constructor
const
Properties
- autocorrect → bool
-
Wheter or not to correct the text automatically
final
-
autofillHints
→ Iterable<
String> ? -
Auto fill hints
final
- autofocus → bool
-
Autofocus
final
- autovalidateMode → AutovalidateMode?
-
Auto validate
final
- buildCounter → InputCounterWidgetBuilder?
-
Counter widget
final
- canRequestFocus → bool
-
Request focus
final
- clipBehavior → Clip
-
Clip behavior
final
- contentInsertionConfiguration → ContentInsertionConfiguration?
-
Content configuration
final
- contextMenuBuilder → EditableTextContextMenuBuilder?
-
Context menu builder
final
- controller → TextEditingController
-
Text field controller
final
- cursorColor → Color?
-
Cursor color
final
- cursorHeight → double?
-
Cursor height
final
- cursorOpacityAnimates → bool?
-
Cursor animation
final
- cursorRadius → Radius?
-
Cursor radius
final
- cursorWidth → double
-
Cursor width
final
- decoration → InputDecoration?
-
Input decoration
final
- dragStartBehavior → DragStartBehavior
-
Drag behavior
final
- dropdownBackgroundColor → Color
-
Color of suggestions dropdown
final
- enabled → bool?
-
Wheter or not it is enabled
final
- enableIMEPersonalizedLearning → bool
-
Enable IMEPersonalized learning
final
- enableInteractiveSelection → bool
-
Enable interactive selection
final
- enableSuggestions → bool
-
Wheter or not to show suggestions
final
- expands → bool
-
Whether or not it expands
final
-
formKey
→ GlobalKey<
FormState> ? -
Form key
final
- greyWhenDisabled → bool
-
If the color should be changed to grey when disabled
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialValue → String?
-
Initial value
final
-
inputFormatters
→ List<
TextInputFormatter> ? -
Input formatters
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- keyboardAppearance → Brightness?
-
Keyboard appearance
final
- keyboardType → TextInputType?
-
Keyboard type
final
- magnifierConfiguration → TextMagnifierConfiguration?
-
Magnifier config
final
- maxLength → int?
-
Max character length
final
- maxLengthEnforcement → MaxLengthEnforcement?
-
Max length setter
final
- maxLines → int?
-
Max lines for the input
final
- minLines → int?
-
Min lines for the input
final
- mouseCursor → MouseCursor?
-
Mouse cursor
final
- obscureText → bool
-
Wheter or not to hide the text
final
- obscuringCharacter → String
-
Obscuring character
final
- onAppPrivateCommand → AppPrivateCommandCallback?
-
Primitive command
final
-
onChanged
→ ValueChanged<
String> ? -
Action to be performed when the value changes
final
- onEditingComplete → VoidCallback?
-
Void callback when editing is completed
final
-
onFieldSubmitted
→ ValueChanged<
String> ? -
Field submitted value
final
-
onSaved
→ FormFieldSetter<
String> ? -
Field submitted on saved
final
-
onSubmitted
→ ValueChanged<
String> ? -
OnSubmitted callback
final
- onTap → GestureTapCallback?
-
On tap callback performed on tap
final
- onTapOutside → TapRegionCallback?
-
OnTapOutside
final
- persistentCubit → PersistedInputCubit?
-
Cubit to work with persistent state from outside,
if not provided will be auto-created
final
- readOnly → bool
-
Read-only
final
- restorationId → String?
-
Restoration ID
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
saveTriggerNotifier
→ ValueNotifier<
bool> -
You provide a bool notifier, when it changes to true or false,
save value is triggered
final
- scribbleEnabled → bool
-
Scribble enabled
final
- scrollController → ScrollController?
-
Scroll controller
final
- scrollPadding → EdgeInsets
-
Scroll padding
final
- scrollPhysics → ScrollPhysics?
-
Physics
final
- selectionControls → TextSelectionControls?
-
Controls
final
- selectionHeightStyle → BoxHeightStyle
-
Controls how height the selection highlight boxes are computed to be.
final
- selectionWidthStyle → BoxWidthStyle
-
Controls how wide the selection highlight boxes are computed to be.
final
- showCursor → bool?
-
Whether or not to show the cursor
final
- smartDashesType → SmartDashesType?
-
Smart dashes type
final
- smartQuotesType → SmartQuotesType?
-
Smart quotes type
final
- spellCheckConfiguration → SpellCheckConfiguration?
-
Spell check
final
- strutStyle → StrutStyle?
-
Text strut style
final
- style → TextStyle?
-
Text style
final
- textAlign → TextAlign
-
Text alignment
final
- textAlignVertical → TextAlignVertical?
-
Text alignment vertical
final
- textCapitalization → TextCapitalization
-
Text capitalization
final
- textDirection → TextDirection?
-
Text direction
final
- textInputAction → TextInputAction?
-
Text input action
final
- undoController → UndoHistoryController?
-
Undo controller
final
- uniqueId → String
-
Id for unique bloc cache
final
-
validator
→ FormFieldValidator<
String> ? -
Field validator
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< PersistedTextField> -
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