Skip to content

Commit

Permalink
avoid wrapper class
Browse files Browse the repository at this point in the history
  • Loading branch information
dnys1 committed Mar 7, 2024
1 parent f85989b commit fae7fcc
Showing 1 changed file with 4 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
import 'package:celest_core/src/secure_storage/secure_storage.dart';

final class SecureStoragePlatform implements SecureStorage {
SecureStoragePlatform({
String? scope,
}) : _impl = MemorySecureStorage(scope: scope ?? _defaultScope);

final SecureStorage _impl;
extension type SecureStoragePlatform._(SecureStorage _impl)
implements SecureStorage {
SecureStoragePlatform({String? scope})
: _impl = MemorySecureStorage(scope: scope ?? _defaultScope);

static const _defaultScope = 'dev.celest.celest';

@override
void clear() => _impl.clear();

@override
String? delete(String key) => _impl.delete(key);

@override
String? read(String key) => _impl.read(key);

@override
String write(String key, String value) => _impl.write(key, value);
}

0 comments on commit fae7fcc

Please sign in to comment.