SelectableText class

Inheritance
Available extensions

Constructors

SelectableText(String data, {Key? key, FocusNode? focusNode, TextStyle? style, StrutStyle? strutStyle, TextAlign? textAlign, TextDirection? textDirection, TextScaler? textScaler, bool showCursor = false, bool autofocus = false, int? minLines, int? maxLines, double cursorWidth = 2.0, double? cursorHeight, Radius? cursorRadius, Color? cursorColor, BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight, BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight, DragStartBehavior dragStartBehavior = DragStartBehavior.start, bool enableInteractiveSelection = true, TextSelectionControls? selectionControls, GestureTapCallback? onTap, ScrollPhysics? scrollPhysics, String? semanticsLabel, TextHeightBehavior? textHeightBehavior, TextWidthBasis? textWidthBasis, SelectionChangedCallback? onSelectionChanged, bool useNativeContextMenu = false, EditableTextContextMenuBuilder? contextMenuBuilder = _defaultContextMenuBuilder, TextMagnifierConfiguration? magnifierConfiguration})
const
SelectableText.rich(TextSpan textSpan, {Key? key, FocusNode? focusNode, TextStyle? style, StrutStyle? strutStyle, TextAlign? textAlign, TextDirection? textDirection, TextScaler? textScaler, bool showCursor = false, bool autofocus = false, int? minLines, int? maxLines, double cursorWidth = 2.0, double? cursorHeight, Radius? cursorRadius, Color? cursorColor, BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight, BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight, DragStartBehavior dragStartBehavior = DragStartBehavior.start, bool enableInteractiveSelection = true, TextSelectionControls? selectionControls, GestureTapCallback? onTap, ScrollPhysics? scrollPhysics, String? semanticsLabel, TextHeightBehavior? textHeightBehavior, TextWidthBasis? textWidthBasis, SelectionChangedCallback? onSelectionChanged, bool useNativeContextMenu = false, EditableTextContextMenuBuilder? contextMenuBuilder = _defaultContextMenuBuilder, TextMagnifierConfiguration? magnifierConfiguration})
const

Properties

asSliver Widget

Available on Widget, provided by the XWidgetArcane extension

no setter
ast Widget

Available on Widget, provided by the XAST extension

no setter
autofocus bool
Whether this text field should focus itself if nothing else is already focused.
final
blurIn Widget

Available on Widget, provided by the XWidgetEffect extension

no setter
centered Widget

Available on Widget, provided by the XWidget extension

no setter
contextMenuBuilder EditableTextContextMenuBuilder?
Builds the text selection toolbar when requested by the user.
final
cursorColor Color?
final
cursorHeight double?
How tall the cursor will be.
final
cursorRadius Radius?
How rounded the corners of the cursor should be.
final
cursorWidth double
How thick the cursor will be.
final
data String?
final
dragStartBehavior DragStartBehavior
Determines the way that drag start behavior is handled.
final
enableInteractiveSelection bool
Whether to enable user interface affordances for changing the text selection.
final
expand Widget

Available on Widget, provided by the XWidget extension

no setter
flexible Widget

Available on Widget, provided by the XWidget extension

no setter
focusNode FocusNode?
final
hashCode int
The hash code for this object.
no setterinherited
ih Widget

Available on Widget, provided by the XWidgetArcane extension

no setter
intrinsicHeight Widget

Available on Widget, provided by the XWidget extension

no setter
intrinsicSize Widget

Available on Widget, provided by the XWidget extension

no setter
intrinsicWidth Widget

Available on Widget, provided by the XWidget extension

no setter
iw Widget

Available on Widget, provided by the XWidgetArcane extension

no setter
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
magnifierConfiguration TextMagnifierConfiguration?
The configuration for the magnifier used when the text is selected.
final
maxLines int?
The maximum number of lines to show at one time, wrapping if necessary.
final
minLines int?
The minimum number of lines to occupy when the content spans fewer lines.
final
onSelectionChanged SelectionChangedCallback?
Called when the user changes the selection of text (including the cursor location).
final
onTap GestureTapCallback?
Called when the user taps on this selectable text.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
safeArea Widget

Available on Widget, provided by the XWidget extension

no setter
scrollable Widget

Available on Widget, provided by the XWidget extension

no setter
scrollableHorizontal Widget

Available on Widget, provided by the XWidget extension

no setter
scrollPhysics ScrollPhysics?
The ScrollPhysics to use when vertically scrolling the input.
final
selectionControls TextSelectionControls?
Optional delegate for building the text selection handles.
final
selectionEnabled bool
Same as enableInteractiveSelection.
no setter
selectionHeightStyle BoxHeightStyle
final
selectionWidthStyle BoxWidthStyle
final
semanticsLabel String?
An alternative semantics label for this text.
final
showCursor bool
Whether to show cursor.
final
strutStyle StrutStyle?
The strut style used for the vertical layout.
final
style TextStyle?
final
textAlign TextAlign?
How the text should be aligned horizontally.
final
textDirection TextDirection?
The directionality of the text.
final
textHeightBehavior TextHeightBehavior?
Defines how to apply TextStyle.height over and under text.
final
textScaler TextScaler?
The font scaling strategy to use when laying out and rendering the text.
final
textSpan TextSpan?
final
textWidthBasis TextWidthBasis?
Defines how to measure the width of the rendered text.
final
useNativeContextMenu bool
final

Methods

animate({Key? key, List<Effect>? effects, AnimateCallback? onInit, AnimateCallback? onPlay, AnimateCallback? onComplete, bool? autoPlay, Duration? delay, AnimationController? controller, Adapter? adapter, double? target, double? value}) Animate

Available on Widget, provided by the AnimateWidgetExtensions extension

Wraps the target Widget in an Animate instance, and returns the instance for chaining calls. Ex. myWidget.animate() is equivalent to Animate(child: myWidget).
asSkeleton({bool enabled = true, bool leaf = false, Widget? replacement, bool unite = false, AsyncSnapshot? snapshot}) Widget

Available on Widget, provided by the SkeletonExtension extension

asSkeletonSliver({bool enabled = true}) Widget

Available on Widget, provided by the SkeletonExtension extension

base() Widget

Available on Widget, provided by the TextExtension extension

black() Widget

Available on Widget, provided by the TextExtension extension

blockQuote() Widget

Available on Widget, provided by the TextExtension extension

bold() Widget

Available on Widget, provided by the TextExtension extension

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
center({Key? key}) Widget

Available on Widget, provided by the WidgetExtension extension

clip({Clip clipBehavior = Clip.hardEdge}) Widget

Available on Widget, provided by the WidgetExtension extension

clipOval({Clip clipBehavior = Clip.antiAlias}) Widget

Available on Widget, provided by the WidgetExtension extension

clipPath({Clip clipBehavior = Clip.antiAlias, required CustomClipper<Path> clipper}) Widget

Available on Widget, provided by the WidgetExtension extension

clipRRect({BorderRadiusGeometry borderRadius = BorderRadius.zero, Clip clipBehavior = Clip.antiAlias}) Widget

Available on Widget, provided by the WidgetExtension extension

constrained({double? minWidth, double? maxWidth, double? minHeight, double? maxHeight}) Widget

Available on Widget, provided by the WidgetExtension extension

createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugContainer([Color color = Colors.red]) Widget

Available on Widget, provided by the DebugContainer extension

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
ellipsis() Widget

Available on Widget, provided by the TextExtension extension

excludeSkeleton({bool exclude = true}) Widget

Available on Widget, provided by the SkeletonExtension extension

expanded({int flex = 1}) Widget

Available on Widget, provided by the WidgetExtension extension

extraBold() Widget

Available on Widget, provided by the TextExtension extension

extraLight() Widget

Available on Widget, provided by the TextExtension extension

foreground() Widget

Available on Widget, provided by the TextExtension extension

h1() Widget

Available on Widget, provided by the TextExtension extension

h2() Widget

Available on Widget, provided by the TextExtension extension

h3() Widget

Available on Widget, provided by the TextExtension extension

h4() Widget

Available on Widget, provided by the TextExtension extension

iconDestructiveForeground() Widget

Available on Widget, provided by the IconExtension extension

iconLarge() Widget

Available on Widget, provided by the IconExtension extension

iconMedium() Widget

Available on Widget, provided by the IconExtension extension

iconMutedForeground() Widget

Available on Widget, provided by the IconExtension extension

iconPrimary() Widget

Available on Widget, provided by the IconExtension extension

iconPrimaryForeground() Widget

Available on Widget, provided by the IconExtension extension

iconSecondary() Widget

Available on Widget, provided by the IconExtension extension

iconSecondaryForeground() Widget

Available on Widget, provided by the IconExtension extension

iconSmall() Widget

Available on Widget, provided by the IconExtension extension

iconX2Large() Widget

Available on Widget, provided by the IconExtension extension

iconX2Small() Widget

Available on Widget, provided by the IconExtension extension

iconX3Large() Widget

Available on Widget, provided by the IconExtension extension

iconX3Small() Widget

Available on Widget, provided by the IconExtension extension

iconX4Large() Widget

Available on Widget, provided by the IconExtension extension

iconX4Small() Widget

Available on Widget, provided by the IconExtension extension

iconXLarge() Widget

Available on Widget, provided by the IconExtension extension

iconXSmall() Widget

Available on Widget, provided by the IconExtension extension

ignoreSkeleton() Widget

Available on Widget, provided by the SkeletonExtension extension

inlineCode() Widget

Available on Widget, provided by the TextExtension extension

intrinsic({double? stepWidth, double? stepHeight}) Widget

Available on Widget, provided by the WidgetExtension extension

intrinsicHeight() Widget

Available on Widget, provided by the WidgetExtension extension

intrinsicWidth({double? stepWidth, double? stepHeight}) Widget

Available on Widget, provided by the WidgetExtension extension

italic() Widget

Available on Widget, provided by the TextExtension extension

large() Widget

Available on Widget, provided by the TextExtension extension

lead() Widget

Available on Widget, provided by the TextExtension extension

li() Widget

Available on Widget, provided by the TextExtension extension

light() Widget

Available on Widget, provided by the TextExtension extension

medium() Widget

Available on Widget, provided by the TextExtension extension

mono() Widget

Available on Widget, provided by the TextExtension extension

muted() Widget

Available on Widget, provided by the TextExtension extension

normal() Widget

Available on Widget, provided by the TextExtension extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDoublePressed(VoidCallback action, {HitTestBehavior? behavior, Set<PointerDeviceKind>? supportedDevices}) Widget

Available on Widget, provided by the XOnGestureWidget extension

onHover(void action(bool hovering)) Widget

Available on Widget, provided by the XOnGestureWidget extension

onLongPressed(VoidCallback action, {HitTestBehavior? behavior, Set<PointerDeviceKind>? supportedDevices}) Widget

Available on Widget, provided by the XOnGestureWidget extension

onLongSecondaryPressed(VoidCallback action, {HitTestBehavior? behavior, Set<PointerDeviceKind>? supportedDevices}) Widget

Available on Widget, provided by the XOnGestureWidget extension

onLongTertiaryPressed(VoidCallback action, {HitTestBehavior? behavior, Set<PointerDeviceKind>? supportedDevices}) Widget

Available on Widget, provided by the XOnGestureWidget extension

onPressed(VoidCallback action, {HitTestBehavior? behavior, Set<PointerDeviceKind>? supportedDevices}) Widget

Available on Widget, provided by the XOnGestureWidget extension

onSecondaryPressed(VoidCallback action, {HitTestBehavior? behavior, Set<PointerDeviceKind>? supportedDevices}) Widget

Available on Widget, provided by the XOnGestureWidget extension

onTertiaryPressed(VoidCallback action, {HitTestBehavior? behavior, Set<PointerDeviceKind>? supportedDevices}) Widget

Available on Widget, provided by the XOnGestureWidget extension

p({bool firstChild = false}) Widget

Available on Widget, provided by the TextExtension extension

pad(double all) Widget

Available on Widget, provided by the XWidget extension

padBottom(double value) Widget

Available on Widget, provided by the XWidget extension

padLeft(double value) Widget

Available on Widget, provided by the XWidget extension

padOnly({double left = 0, double top = 0, double right = 0, double bottom = 0}) Widget

Available on Widget, provided by the XWidget extension

padRight(double value) Widget

Available on Widget, provided by the XWidget extension

padTop(double value) Widget

Available on Widget, provided by the XWidget extension

positioned({Key? key, double? left, double? top, double? right, double? bottom}) Widget

Available on Widget, provided by the WidgetExtension extension

primaryForeground() Widget

Available on Widget, provided by the TextExtension extension

sans() Widget

Available on Widget, provided by the TextExtension extension

secondaryForeground() Widget

Available on Widget, provided by the TextExtension extension

semiBold() Widget

Available on Widget, provided by the TextExtension extension

singleLine() Widget

Available on Widget, provided by the TextExtension extension

sized({double? width, double? height}) Widget

Available on Widget, provided by the WidgetExtension extension

sized({double? width, double? height}) Widget

Available on Widget, provided by the XWidget extension

small() Widget

Available on Widget, provided by the TextExtension extension

textCenter() Widget

Available on Widget, provided by the TextExtension extension

textEnd() Widget

Available on Widget, provided by the TextExtension extension

textJustify() Widget

Available on Widget, provided by the TextExtension extension

textLarge() Widget

Available on Widget, provided by the TextExtension extension

textLeft() Widget

Available on Widget, provided by the TextExtension extension

textMuted() Widget

Available on Widget, provided by the TextExtension extension

textRight() Widget

Available on Widget, provided by the TextExtension extension

textSmall() Widget

Available on Widget, provided by the TextExtension extension

textStart() Widget

Available on Widget, provided by the TextExtension extension

then(InlineSpan span) Widget

Available on Widget, provided by the TextExtension extension

thenButton({required VoidCallback onPressed, required Widget child}) Widget

Available on Widget, provided by the TextExtension extension

thenInlineCode(String text) Widget

Available on Widget, provided by the TextExtension extension

thenText(String text) Widget

Available on Widget, provided by the TextExtension extension

thin() Widget

Available on Widget, provided by the TextExtension extension

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
transform({Key? key, required Matrix4 transform}) Widget

Available on Widget, provided by the WidgetExtension extension

underline() Widget

Available on Widget, provided by the TextExtension extension

withAlign(AlignmentGeometry alignment) Widget

Available on Widget, provided by the WidgetExtension extension

withMargin({double? top, double? bottom, double? left, double? right, double? horizontal, double? vertical, double? all}) Widget

Available on Widget, provided by the WidgetExtension extension

withOpacity(double opacity) Widget

Available on Widget, provided by the WidgetExtension extension

withPadding({double? top, double? bottom, double? left, double? right, double? horizontal, double? vertical, double? all, EdgeInsetsGeometry? padding}) Widget

Available on Widget, provided by the WidgetExtension extension

withTooltip(String tooltip) Widget

Available on Widget, provided by the XWidgetArcane extension

x2Large() Widget

Available on Widget, provided by the TextExtension extension

x3Large() Widget

Available on Widget, provided by the TextExtension extension

x4Large() Widget

Available on Widget, provided by the TextExtension extension

x5Large() Widget

Available on Widget, provided by the TextExtension extension

x6Large() Widget

Available on Widget, provided by the TextExtension extension

x7Large() Widget

Available on Widget, provided by the TextExtension extension

x8Large() Widget

Available on Widget, provided by the TextExtension extension

x9Large() Widget

Available on Widget, provided by the TextExtension extension

xLarge() Widget

Available on Widget, provided by the TextExtension extension

xSmall() Widget

Available on Widget, provided by the TextExtension extension

Operators

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