GradientSelectableText.rich constructor

const GradientSelectableText.rich(
  1. TextSpan textSpan, {
  2. required Gradient gradient,
  3. Key? key,
  4. FocusNode? focusNode,
  5. TextStyle style = const TextStyle(color: Colors.white),
  6. StrutStyle? strutStyle,
  7. TextAlign? textAlign,
  8. TextDirection? textDirection,
  9. double? textScaleFactor,
  10. bool showCursor = false,
  11. bool autofocus = false,
  12. ToolbarOptions? toolbarOptions,
  13. int? minLines,
  14. int? maxLines,
  15. double cursorWidth = 2.0,
  16. double? cursorHeight,
  17. Radius? cursorRadius,
  18. Color? cursorColor,
  19. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  20. bool enableInteractiveSelection = true,
  21. TextSelectionControls? selectionControls,
  22. GestureTapCallback? onTap,
  23. ScrollPhysics? scrollPhysics,
  24. TextHeightBehavior? textHeightBehavior,
  25. TextWidthBasis? textWidthBasis,
  26. SelectionChangedCallback? onSelectionChanged,
})

Implementation

const GradientSelectableText.rich(
  TextSpan this.textSpan, {
  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',
      ),
      data = null,
      toolbarOptions = toolbarOptions ??
          const ToolbarOptions(
            selectAll: true,
            copy: true,
          ),
      super(key: key);