Browse Source

refactor(neon): make SettingsStorage and AppStorage internal

Signed-off-by: Nikolas Rimikis <rimikis.nikolas@gmail.com>
pull/674/head
Nikolas Rimikis 1 year ago
parent
commit
c734e00667
No known key found for this signature in database
GPG Key ID: 85ED1DE9786A4FF2
  1. 1
      packages/neon/neon/lib/settings.dart
  2. 3
      packages/neon/neon/lib/src/settings/models/storage.dart

1
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/nextcloud_app_options.dart';
export 'package:neon/src/settings/models/options_category.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/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/models/toggle_option.dart';
export 'package:neon/src/settings/widgets/settings_list.dart'; export 'package:neon/src/settings/widgets/settings_list.dart';

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

@ -1,6 +1,7 @@
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@internal
abstract interface class SettingsStorage { abstract interface class SettingsStorage {
String? getString(final String key); String? getString(final String key);
@ -14,6 +15,8 @@ abstract interface class SettingsStorage {
Future<bool> remove(final String key); Future<bool> remove(final String key);
} }
@immutable
@internal
class AppStorage implements SettingsStorage { class AppStorage implements SettingsStorage {
AppStorage(this._id); AppStorage(this._id);

Loading…
Cancel
Save