cake_wallet/lib/utils/clipboard_util.dart

16 lines
409 B
Dart
Raw Normal View History

import 'package:flutter/services.dart';
import 'package:cake_wallet/utils/device_info.dart';
import 'package:sensitive_clipboard/sensitive_clipboard.dart';
class ClipboardUtil {
static Future<void> setSensitiveDataToClipboard(ClipboardData data) async {
if (DeviceInfo.instance.isMobile) {
await SensitiveClipboard.copy(data.text);
return;
}
return Clipboard.setData(data);
}
}