JidoujishoSelectableText.rich constructor

const JidoujishoSelectableText.rich(
  1. TextSpan textSpan,
  2. {Key? key,
  3. JidoujishoSelectableTextController? controller,
  4. FocusNode? focusNode,
  5. TextStyle? style,
  6. StrutStyle? strutStyle,
  7. TextAlign? textAlign,
  8. TextDirection? textDirection,
  9. double? textScaleFactor,
  10. bool showCursor = false,
  11. bool autofocus = false,
  12. @Deprecated('Use `contextMenuBuilder` instead. ' 'This feature was deprecated after v3.3.0-0.5.pre.') ToolbarOptions? toolbarOptions,
  13. int? minLines,
  14. int? maxLines,
  15. double cursorWidth = 2.0,
  16. double? cursorHeight,
  17. Radius? cursorRadius,
  18. Color? cursorColor,
  19. BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight,
  20. BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight,
  21. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  22. bool enableInteractiveSelection = true,
  23. TextSelectionControls? selectionControls,
  24. GestureTapCallback? onTap,
  25. dynamic onDoubleTap(
      )?,
    1. ScrollPhysics? scrollPhysics,
    2. String? semanticsLabel,
    3. TextHeightBehavior? textHeightBehavior,
    4. TextWidthBasis? textWidthBasis,
    5. SelectionChangedCallback? onSelectionChanged,
    6. EditableTextContextMenuBuilder? contextMenuBuilder = _defaultContextMenuBuilder,
    7. TextMagnifierConfiguration? magnifierConfiguration}
    )

    Creates a selectable text widget with a TextSpan.

    The textSpan parameter must not be null and only contain TextSpan in textSpan.children. Other type of InlineSpan is not allowed.

    The autofocus and dragStartBehavior arguments must not be null.

    Implementation

    const JidoujishoSelectableText.rich(
      TextSpan this.textSpan, {
      super.key,
      this.controller,
      this.focusNode,
      this.style,
      this.strutStyle,
      this.textAlign,
      this.textDirection,
      this.textScaleFactor,
      this.showCursor = false,
      this.autofocus = false,
      @Deprecated(
        'Use `contextMenuBuilder` instead. '
        'This feature was deprecated after v3.3.0-0.5.pre.',
      )
          this.toolbarOptions,
      this.minLines,
      this.maxLines,
      this.cursorWidth = 2.0,
      this.cursorHeight,
      this.cursorRadius,
      this.cursorColor,
      this.selectionHeightStyle = ui.BoxHeightStyle.tight,
      this.selectionWidthStyle = ui.BoxWidthStyle.tight,
      this.dragStartBehavior = DragStartBehavior.start,
      this.enableInteractiveSelection = true,
      this.selectionControls,
      this.onTap,
      this.onDoubleTap,
      this.scrollPhysics,
      this.semanticsLabel,
      this.textHeightBehavior,
      this.textWidthBasis,
      this.onSelectionChanged,
      this.contextMenuBuilder = _defaultContextMenuBuilder,
      this.magnifierConfiguration,
    })  : 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;