TextGroup constructor

const TextGroup({
  1. Key? key,
  2. required List<TextGroupItem> texts,
  3. required bool? selectable,
  4. TextStyle? style,
  5. TextSpan outerSpanBuilder(
    1. BuildContext context,
    2. List<InlineSpan> spans,
    3. TextStyle? style
    )?,
  6. int? maxLines,
  7. StrutStyle? strutStyle,
  8. TextAlign? textAlign = TextAlign.start,
  9. TextDirection? textDirection,
  10. double? textScaleFactor,
  11. TextWidthBasis? textWidthBasis = TextWidthBasis.parent,
  12. TextHeightBehavior? textHeightBehavior,
  13. bool? softWrap = true,
  14. TextOverflow? overflow = TextOverflow.clip,
  15. Locale? locale,
  16. FocusNode? focusNode,
  17. bool? showCursor = false,
  18. bool? autofocus = false,
  19. bool? enableInteractiveSelection = true,
  20. ToolbarOptions? toolbarOptions = const ToolbarOptions(selectAll: true, copy: true),
  21. double? cursorWidth = 2.0,
  22. double? cursorHeight,
  23. Radius? cursorRadius,
  24. Color? cursorColor,
  25. DragStartBehavior? dragStartBehavior = DragStartBehavior.start,
  26. int? minLines,
})

Creates a TextGroup which wraps RichText to show TextGroupItem list.

Implementation

const TextGroup({
  Key? key,
  required this.texts,
  required this.selectable,
  this.style,
  this.outerSpanBuilder,
  // both
  this.maxLines,
  this.strutStyle,
  this.textAlign = TextAlign.start,
  this.textDirection,
  this.textScaleFactor,
  this.textWidthBasis = TextWidthBasis.parent,
  this.textHeightBehavior,
  // RichText only
  this.softWrap = true,
  this.overflow = TextOverflow.clip,
  this.locale,
  // SelectableText only
  this.focusNode,
  this.showCursor = false,
  this.autofocus = false,
  this.enableInteractiveSelection = true,
  this.toolbarOptions = const ToolbarOptions(selectAll: true, copy: true),
  this.cursorWidth = 2.0,
  this.cursorHeight,
  this.cursorRadius,
  this.cursorColor,
  this.dragStartBehavior = DragStartBehavior.start,
  this.minLines,
})  : assert(texts.length > 0),
      assert(maxLines == null || maxLines > 0),
      assert(minLines == null || minLines > 0),
      super(key: key);