GradientSelectableText constructor
const
GradientSelectableText(
- String data, {
- required Gradient gradient,
- Key? key,
- FocusNode? focusNode,
- TextStyle style = const TextStyle(color: Colors.white),
- StrutStyle? strutStyle,
- TextAlign? textAlign,
- TextDirection? textDirection,
- double? textScaleFactor,
- bool showCursor = false,
- bool autofocus = false,
- ToolbarOptions? toolbarOptions,
- int? minLines,
- int? maxLines,
- double cursorWidth = 2.0,
- double? cursorHeight,
- Radius? cursorRadius,
- Color? cursorColor,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- bool enableInteractiveSelection = true,
- TextSelectionControls? selectionControls,
- GestureTapCallback? onTap,
- ScrollPhysics? scrollPhysics,
- TextHeightBehavior? textHeightBehavior,
- TextWidthBasis? textWidthBasis,
- SelectionChangedCallback? onSelectionChanged,
Implementation
const GradientSelectableText(
String this.data, {
required this.gradient,
Key? key,
this.focusNode,
this.style = const TextStyle(color: Colors.white),
this.strutStyle,
this.textAlign,
this.textDirection,
this.textScaleFactor,
this.showCursor = false,
this.autofocus = false,
ToolbarOptions? toolbarOptions,
this.minLines,
this.maxLines,
this.cursorWidth = 2.0,
this.cursorHeight,
this.cursorRadius,
this.cursorColor,
this.dragStartBehavior = DragStartBehavior.start,
this.enableInteractiveSelection = true,
this.selectionControls,
this.onTap,
this.scrollPhysics,
this.textHeightBehavior,
this.textWidthBasis,
this.onSelectionChanged,
}) : assert(maxLines == null || maxLines > 0),
assert(minLines == null || minLines > 0),
assert(
(maxLines == null) || (minLines == null) || (maxLines >= minLines),
'minLines can\'t be greater than maxLines',
),
textSpan = null,
toolbarOptions = toolbarOptions ??
const ToolbarOptions(
selectAll: true,
copy: true,
),
super(key: key);