TextGroup constructor
const
TextGroup({
- Key? key,
- required List<
TextGroupItem> texts, - required bool? selectable,
- TextStyle? style,
- TextSpan outerSpanBuilder(
- BuildContext context,
- List<
InlineSpan> spans, - TextStyle? style
- int? maxLines,
- StrutStyle? strutStyle,
- TextAlign? textAlign = TextAlign.start,
- TextDirection? textDirection,
- double? textScaleFactor,
- TextWidthBasis? textWidthBasis = TextWidthBasis.parent,
- TextHeightBehavior? textHeightBehavior,
- bool? softWrap = true,
- TextOverflow? overflow = TextOverflow.clip,
- Locale? locale,
- FocusNode? focusNode,
- bool? showCursor = false,
- bool? autofocus = false,
- bool? enableInteractiveSelection = true,
- ToolbarOptions? toolbarOptions = const ToolbarOptions(selectAll: true, copy: true),
- double? cursorWidth = 2.0,
- double? cursorHeight,
- Radius? cursorRadius,
- Color? cursorColor,
- DragStartBehavior? dragStartBehavior = DragStartBehavior.start,
- 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);