copy static method

Future<void> copy(
  1. String text
)

Implementation

static Future<void> copy(String text) async {
  if (text.isNotEmpty) {
    await Clipboard.setData(ClipboardData(text: text));
    debugPrint('ClickToCopy: $text');
    return;
  } else {
    debugPrint('ClickToCopy: No text to copy on Clipboard');
    //throw ('No text to copy on Clipboard');
  }
}