getFromClipboard static method
Gets text from clipboard
Returns the clipboard text or null if unavailable
Implementation
static Future<String?> getFromClipboard() async {
try {
final ClipboardData? data = await Clipboard.getData(Clipboard.kTextPlain);
return data?.text;
} catch (e) {
// Log error or handle it as needed
return null;
}
}