Browse Source

refactor(neon): rename AppStorage.key

Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
pull/886/head
Nikolas Rimikis 1 year ago
parent
commit
aade4c359a
No known key found for this signature in database
GPG Key ID: 85ED1DE9786A4FF2
  1. 10
      packages/neon/neon/lib/src/settings/models/storage.dart

10
packages/neon/neon/lib/src/settings/models/storage.dart

@ -102,23 +102,23 @@ final class SingleValueStorage {
@internal
final class AppStorage implements SettingsStorage {
const AppStorage(
this.key, [
this.groupKey, [
this.suffix,
]);
final StorageKeys key;
final StorageKeys groupKey;
final String? suffix;
String get id => suffix ?? key.value;
String get id => suffix ?? groupKey.value;
@visibleForTesting
String formatKey(final String key) {
if (suffix != null) {
return '${this.key.value}-$suffix-$key';
return '${groupKey.value}-$suffix-$key';
}
return '${this.key.value}-$key';
return '${groupKey.value}-$key';
}
bool containsKey(final String key) => NeonStorage.database.containsKey(formatKey(key));

Loading…
Cancel
Save