How to copy text from Text Widget flutter?


We don't have any property to copy text from Text widget in flutter.

in Flutter 1.9 introduced SelectableText widget.

  child: SelectableText("Copy Text value",style: TextStyle(),),

Whenlong click on this text now it will show the Clipboard copy option to copy the valu from widget.

Properties of SelectableText Widget

focusNode,style,strutStyle,textAlign,textDirection,showCursor = false,autofocus = false,
ToolbarOptions toolbarOptions,maxLines,cursorWidth = 2.0,cursorRadius,cursorColor,
dragStartBehavior = DragStartBehavior.start,enableInteractiveSelection = true,

With this widget we cn hanlde direct Click events for the Text widget.