mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-10-30 08:57:38 +00:00
16 lines
409 B
Dart
16 lines
409 B
Dart
|
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);
|
||
|
}
|
||
|
}
|