clipboardCopyableText static method

Widget clipboardCopyableText(
  1. BuildContext context,
  2. String text
)

Implementation

static Widget clipboardCopyableText(BuildContext context, String text)
{
  return Row(
      children: [
        Text(text, style: captionStyle(context)).tooltip('Websocket URL for this Charging Point'),
        IconButton(
            onPressed: () {
              Clipboard.setData(ClipboardData(text: text));
              ToastHelper.successToast('URL Copied');
            },
            icon: Icon(Icons.copy, color: Theme.of(context).primaryColor),
            tooltip: 'Click to copy the Websocket URL for this Charging Point'
        )
      ]
  );
}