cake_wallet/lib/utils/clipboard_util.dart
Konstantin Ullrich c68baf7244
CW-423 Use SensitiveClipboard for sensitive Stings (#1013)
* CW-423 Use SensitiveClipboard for sensitive Stings

* CW-423 Bump Android Target and Min SDK

* CW-423 Use Helper function for sensitive Clipboard
2023-08-01 15:52:03 +03:00

15 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);
}
}