From c734e00667bd2544336933a5f4e8a2365f5b4d8c Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Tue, 29 Aug 2023 17:13:33 +0200 Subject: [PATCH] refactor(neon): make SettingsStorage and AppStorage internal Signed-off-by: Nikolas Rimikis --- packages/neon/neon/lib/settings.dart | 1 - packages/neon/neon/lib/src/settings/models/storage.dart | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/neon/neon/lib/settings.dart b/packages/neon/neon/lib/settings.dart index 08c0053e..8a1e4d8e 100644 --- a/packages/neon/neon/lib/settings.dart +++ b/packages/neon/neon/lib/settings.dart @@ -2,6 +2,5 @@ export 'package:neon/src/models/label_builder.dart'; export 'package:neon/src/settings/models/nextcloud_app_options.dart'; export 'package:neon/src/settings/models/options_category.dart'; export 'package:neon/src/settings/models/select_option.dart'; -export 'package:neon/src/settings/models/storage.dart'; export 'package:neon/src/settings/models/toggle_option.dart'; export 'package:neon/src/settings/widgets/settings_list.dart'; diff --git a/packages/neon/neon/lib/src/settings/models/storage.dart b/packages/neon/neon/lib/src/settings/models/storage.dart index d033964d..ab3ec136 100644 --- a/packages/neon/neon/lib/src/settings/models/storage.dart +++ b/packages/neon/neon/lib/src/settings/models/storage.dart @@ -1,6 +1,7 @@ import 'package:meta/meta.dart'; import 'package:shared_preferences/shared_preferences.dart'; +@internal abstract interface class SettingsStorage { String? getString(final String key); @@ -14,6 +15,8 @@ abstract interface class SettingsStorage { Future remove(final String key); } +@immutable +@internal class AppStorage implements SettingsStorage { AppStorage(this._id);