mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-27 05:59:38 +00:00
24 lines
693 B
Dart
24 lines
693 B
Dart
|
final SecureStorage secureStorageShared = FakeSecureStorage();
|
||
|
|
||
|
abstract class SecureStorage {
|
||
|
Future<String?> read({required String key});
|
||
|
Future<void> write({required String key, required String? value});
|
||
|
Future<void> delete({required String key});
|
||
|
// Legacy
|
||
|
Future<String?> readNoIOptions({required String key});
|
||
|
}
|
||
|
|
||
|
class FakeSecureStorage extends SecureStorage {
|
||
|
@override
|
||
|
Future<String?> read({required String key}) async => null;
|
||
|
|
||
|
@override
|
||
|
Future<void> write({required String key, required String? value}) async {}
|
||
|
|
||
|
@override
|
||
|
Future<void> delete({required String key}) async {}
|
||
|
|
||
|
@override
|
||
|
Future<String?> readNoIOptions({required String key}) async => null;
|
||
|
}
|