copyToClipboard static method
Copies text to clipboard
Returns true if successful, false otherwise
Implementation
static Future<bool> copyToClipboard(String text) async {
try {
await Clipboard.setData(ClipboardData(text: text));
return true;
} catch (e) {
// Log error or handle it as needed
return false;
}
}