SuperTextField class
Text field that supports styled text.
SuperTextField adapts to the expectations of the current platform, or conforms to a specified configuration.
- desktop uses a blinking cursor and mouse gestures
- Android uses draggable handles in the Android style
- iOS uses draggable handles in the iOS style
SuperTextField is built on top of platform-specific text field implementations, which may offer additional customization beyond that of SuperTextField:
- SuperDesktopTextField, configured for a typical desktop experience.
- SuperAndroidTextField, configured for a typical Android experience.
- SuperIOSTextField, configured for a typical iOS experience.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SuperTextField
Constructors
-
SuperTextField.new({Key? key, FocusNode? focusNode, String? tapRegionGroupId, SuperTextFieldPlatformConfiguration? configuration, AttributedTextEditingController? textController, TextAlign? textAlign, AttributionStyleBuilder textStyleBuilder = defaultTextFieldStyleBuilder, InlineWidgetBuilderChain inlineWidgetBuilders = const [], HintBehavior hintBehavior = HintBehavior.displayHintUntilFocus, WidgetBuilder? hintBuilder, Color? controlsColor, CaretStyle? caretStyle, BlinkTimingMode blinkTimingMode = BlinkTimingMode.ticker, Color? selectionColor, int? minLines, int? maxLines = 1, double? lineHeight, TextInputSource? inputSource, List<
TextFieldKeyboardHandler> ? keyboardHandlers, Map<String, SuperTextFieldSelectorHandler> ? selectorHandlers, List<SuperTextFieldTapHandler> tapHandlers = const [], EdgeInsets? padding, TextInputAction? textInputAction, TextInputConfiguration? imeConfiguration, bool? showComposingUnderline}) -
const
Properties
- blinkTimingMode → BlinkTimingMode
-
The timing mechanism used to blink, e.g.,
Ticker
orTimer
.final - caretStyle → CaretStyle?
-
The visual representation of the caret.
final
- configuration → SuperTextFieldPlatformConfiguration?
-
The platform-style configuration for this text field, or
null
to automatically configure for the current platform.final - controlsColor → Color?
-
The color of the caret, drag handles, and other controls.
final
- focusNode → FocusNode?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hintBehavior → HintBehavior
-
Policy for when the hint should be displayed.
final
- hintBuilder → WidgetBuilder?
-
Builder that creates the hint widget, when a hint is displayed.
final
- imeConfiguration → TextInputConfiguration?
-
Preferences for how the platform IME should look and behave during editing.
final
- inlineWidgetBuilders → InlineWidgetBuilderChain
-
A Chain of Responsibility that's used to build inline widgets.
final
- inputSource → TextInputSource?
-
The SuperTextField input source, e.g., keyboard or Input Method Engine.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
keyboardHandlers
→ List<
TextFieldKeyboardHandler> ? -
Priority list of handlers that process all physical keyboard
key presses, for text input, deletion, caret movement, etc.
final
- lineHeight → double?
-
The height of a single line of text in this text field, used
with minLines and maxLines to size the text field.
final
- maxLines → int?
-
The maximum height of this text field, represented as a
line count.
final
- minLines → int?
-
The minimum height of this text field, represented as a
line count.
final
- padding → EdgeInsets?
-
Padding placed around the text content of this text field, but within the
scrollable viewport.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectionColor → Color?
-
The color of selection rectangles that appear around selected text.
final
-
selectorHandlers
→ Map<
String, SuperTextFieldSelectorHandler> ? -
Handlers for all Mac OS "selectors" reported by the IME.
final
- showComposingUnderline → bool?
-
Whether to show an underline beneath the text in the composing region, or
null
to let SuperTextField decide when to show the underline.final -
tapHandlers
→ List<
SuperTextFieldTapHandler> -
Optional list of handlers that respond to taps on content, e.g., opening
a link when the user taps on text with a link attribution.
final
- tapRegionGroupId → String?
-
An optional group ID for a tap region that surrounds this text field
and also surrounds any related widgets, such as drag handles and a toolbar.
final
- textAlign → TextAlign?
-
The alignment of the text in this text field.
final
- textController → AttributedTextEditingController?
-
Controller that holds the current text and selection for this field,
similar to a standard Flutter
TextEditingController
.final - textInputAction → TextInputAction?
-
The main action for the virtual keyboard, e.g. TextInputAction.done.
final
- textStyleBuilder → AttributionStyleBuilder
-
Text style factory that creates styles for the content in
textController based on the attributions in that content.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< SuperTextField> -
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, int wrapWidth = 65}) → 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