copyToClipBoard static method
Implementation
static Future copyToClipBoard(String? text) async {
if (text == null) {
return;
}
await Clipboard.setData(
ClipboardData(text: text),
);
Get.showSnackbar(
GetSnackBar(
title: "Copied !",
message: "$text copied to clipboard",
duration: const Duration(seconds: 2),
),
);
}