copyText static method

Future<void> copyText(
  1. String text
)

Implementation

static Future<void> copyText(String text) async {
  try {
    await Clipboard.setData(ClipboardData(text: text));
  } catch (e) {
    debugPrint('copyText: ${e.toString()}');
  }
}