mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-27 05:59:38 +00:00
c68baf7244
* CW-423 Use SensitiveClipboard for sensitive Stings * CW-423 Bump Android Target and Min SDK * CW-423 Use Helper function for sensitive Clipboard
15 lines
409 B
Dart
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);
|
|
}
|
|
}
|