TextSelectionThemeData class
Defines the text selection visual properties for descendant TextField and SelectableText widgets.
Descendant widgets obtain the current TextSelectionThemeData object using TextSelectionTheme.of. Instances of TextSelectionThemeData can be customized with TextSelectionThemeData.copyWith.
Typically a TextSelectionThemeData is specified as part of the overall Theme with ThemeData.textSelectionTheme.
See also:
- TextSelectionTheme, an InheritedWidget that propagates the theme down its subtree.
- InputDecorationThemeData, which defines most other visual properties of text fields.
- Mixed-in types
- Annotations
Constructors
- TextSelectionThemeData({Color? cursorColor, Color? selectionColor, Color? selectionHandleColor})
-
Creates the set of properties used to configure TextFields.
const
Properties
- cursorColor → Color?
-
The color of the cursor in the text field.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectionColor → Color?
-
The background color of selected text.
final
- selectionHandleColor → Color?
-
The color of the selection handles on the text field.
final
Methods
-
copyWith(
{Color? cursorColor, Color? selectionColor, Color? selectionHandleColor}) → TextSelectionThemeData - Creates a copy of this object with the given fields replaced with the specified values.
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
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
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
lerp(
TextSelectionThemeData? a, TextSelectionThemeData? b, double t) → TextSelectionThemeData? - Linearly interpolate between two text field themes.