selectable method

Widget selectable({
  1. SelectionController? controller,
  2. Style? selectionHighlightStyle,
})

Implementation

Widget selectable({
  SelectionController? controller,
  Style? selectionHighlightStyle,
}) {
  if (textSpan != null) {
    return SelectableRichText(
      text: textSpan!,
      style: style,
      selectionHighlightStyle: selectionHighlightStyle,
      textAlign: textAlign,
      softWrap: softWrap,
      overflow: overflow,
      maxWidth: maxWidth,
      controller: controller,
    );
  }
  return SelectableText(
    data ?? '',
    style: style,
    selectionHighlightStyle: selectionHighlightStyle,
    textAlign: textAlign,
    softWrap: softWrap,
    overflow: overflow,
    maxWidth: maxWidth,
    controller: controller,
  );
}