From fad76be56bed2da31bd1cd9a474d7b73bf599c05 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sat, 1 Jul 2023 14:18:18 +0200 Subject: [PATCH] settings,neon: Move settings into neon --- packages/app/pubspec.lock | 11 ++----- packages/app/pubspec_overrides.yaml | 4 +-- packages/neon/neon/lib/settings.dart | 6 ++++ packages/neon/neon/lib/src/app.dart | 2 +- .../neon/neon/lib/src/blocs/accounts.dart | 2 +- packages/neon/neon/lib/src/blocs/apps.dart | 4 +-- .../lib/src/blocs/push_notifications.dart | 2 +- .../lib/src/interfaces/notifications.dart | 4 +-- .../neon/lib/src/pages/account_settings.dart | 5 +++- packages/neon/neon/lib/src/pages/home.dart | 2 +- .../lib/src/pages/nextcloud_app_settings.dart | 7 ++++- .../neon/neon/lib/src/pages/settings.dart | 15 ++++++---- .../models/nextcloud_app_options.dart} | 9 +++--- .../neon/lib/src/settings/models}/option.dart | 8 ++++- .../settings/models}/options_category.dart | 2 +- .../src/settings/models}/select_option.dart | 6 +++- .../{utils => settings/models}/storage.dart | 12 +++++++- .../src/settings/models}/toggle_option.dart | 3 +- .../widgets/account_settings_tile.dart | 6 ++-- .../widgets/checkbox_settings_tile.dart | 5 +++- .../widgets/custom_settings_tile.dart | 3 +- .../dropdown_button_settings_tile.dart | 6 +++- .../src/settings/widgets}/label_builder.dart | 2 +- .../src/settings}/widgets/option_builder.dart | 3 +- .../settings}/widgets/settings_category.dart | 4 ++- .../src/settings}/widgets/settings_list.dart | 4 ++- .../src/settings}/widgets/settings_tile.dart | 3 +- .../widgets/text_settings_tile.dart | 6 ++-- .../neon/lib/src/utils/account_options.dart | 6 ++-- .../lib/src/utils/app_implementation.dart | 6 ++-- .../neon/lib/src/utils/global_options.dart | 7 +++-- .../neon/neon/lib/src/utils/push_utils.dart | 2 +- .../lib/src/utils/settings_export_helper.dart | 2 +- .../neon/lib/src/utils/sort_box_builder.dart | 3 +- .../utils/sort_box_order_option_values.dart | 2 +- packages/neon/neon/lib/utils.dart | 2 -- packages/neon/neon/pubspec.yaml | 5 +--- packages/neon/neon/pubspec_overrides.yaml | 4 +-- packages/neon/neon_files/lib/neon_files.dart | 2 +- packages/neon/neon_files/lib/options.dart | 2 +- packages/neon/neon_files/pubspec.yaml | 4 --- .../neon/neon_files/pubspec_overrides.yaml | 4 +-- packages/neon/neon_news/lib/neon_news.dart | 2 +- packages/neon/neon_news/lib/options.dart | 2 +- packages/neon/neon_news/pubspec.yaml | 4 --- .../neon/neon_news/pubspec_overrides.yaml | 4 +-- packages/neon/neon_notes/lib/neon_notes.dart | 2 +- packages/neon/neon_notes/lib/options.dart | 2 +- packages/neon/neon_notes/pubspec.yaml | 4 --- .../neon/neon_notes/pubspec_overrides.yaml | 4 +-- .../lib/neon_notifications.dart | 1 + .../neon/neon_notifications/lib/options.dart | 2 +- .../neon_notifications/pubspec_overrides.yaml | 4 +-- packages/settings/.gitignore | 30 ------------------- packages/settings/.metadata | 10 ------- packages/settings/LICENSE | 1 - packages/settings/README.md | 3 -- packages/settings/analysis_options.yaml | 1 - packages/settings/lib/settings.dart | 21 ------------- .../settings/lib/src/storage/storage.dart | 12 -------- packages/settings/pubspec.yaml | 18 ----------- 61 files changed, 127 insertions(+), 197 deletions(-) create mode 100644 packages/neon/neon/lib/settings.dart rename packages/neon/neon/lib/src/{utils/nextcloud_app_specific_options.dart => settings/models/nextcloud_app_options.dart} (54%) rename packages/{settings/lib/src/options => neon/neon/lib/src/settings/models}/option.dart (79%) rename packages/{settings/lib/src/options => neon/neon/lib/src/settings/models}/options_category.dart (62%) rename packages/{settings/lib/src/options => neon/neon/lib/src/settings/models}/select_option.dart (86%) rename packages/neon/neon/lib/src/{utils => settings/models}/storage.dart (80%) rename packages/{settings/lib/src/options => neon/neon/lib/src/settings/models}/toggle_option.dart (85%) rename packages/neon/neon/lib/src/{ => settings}/widgets/account_settings_tile.dart (78%) rename packages/{settings/lib/src => neon/neon/lib/src/settings}/widgets/checkbox_settings_tile.dart (78%) rename packages/{settings/lib/src => neon/neon/lib/src/settings}/widgets/custom_settings_tile.dart (83%) rename packages/{settings/lib/src => neon/neon/lib/src/settings}/widgets/dropdown_button_settings_tile.dart (89%) rename packages/{settings/lib/src/options => neon/neon/lib/src/settings/widgets}/label_builder.dart (58%) rename packages/{settings/lib/src => neon/neon/lib/src/settings}/widgets/option_builder.dart (85%) rename packages/{settings/lib/src => neon/neon/lib/src/settings}/widgets/settings_category.dart (79%) rename packages/{settings/lib/src => neon/neon/lib/src/settings}/widgets/settings_list.dart (75%) rename packages/{settings/lib/src => neon/neon/lib/src/settings}/widgets/settings_tile.dart (74%) rename packages/neon/neon/lib/src/{ => settings}/widgets/text_settings_tile.dart (73%) delete mode 100644 packages/settings/.gitignore delete mode 100644 packages/settings/.metadata delete mode 120000 packages/settings/LICENSE delete mode 100644 packages/settings/README.md delete mode 100644 packages/settings/analysis_options.yaml delete mode 100644 packages/settings/lib/settings.dart delete mode 100644 packages/settings/lib/src/storage/storage.dart delete mode 100644 packages/settings/pubspec.yaml diff --git a/packages/app/pubspec.lock b/packages/app/pubspec.lock index a7eb10d4..750e7266 100644 --- a/packages/app/pubspec.lock +++ b/packages/app/pubspec.lock @@ -101,10 +101,10 @@ packages: dependency: transitive description: name: cookie_jar - sha256: "823fd13d22c5cf0c846e8a31c9b276f768f423cca134990c22c33045462f8ef9" + sha256: "1024f3a52bee181fc8f10f4a359085471587d7406323090a53a7171bc0aa5c37" url: "https://pub.dev" source: hosted - version: "4.0.3" + version: "4.0.5" cross_file: dependency: transitive description: @@ -861,13 +861,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.1.6" - settings: - dependency: "direct overridden" - description: - path: "../settings" - relative: true - source: path - version: "1.0.0" share_plus: dependency: transitive description: diff --git a/packages/app/pubspec_overrides.yaml b/packages/app/pubspec_overrides.yaml index 8c41a58d..769385c2 100644 --- a/packages/app/pubspec_overrides.yaml +++ b/packages/app/pubspec_overrides.yaml @@ -1,4 +1,4 @@ -# melos_managed_dependency_overrides: dynamite_runtime,file_icons,neon,neon_files,neon_news,neon_notes,neon_notifications,nextcloud,settings,sort_box,wakelock_windows +# melos_managed_dependency_overrides: dynamite_runtime,file_icons,neon,neon_files,neon_news,neon_notes,neon_notifications,nextcloud,sort_box,wakelock_windows dependency_overrides: dynamite_runtime: path: ../dynamite/dynamite_runtime @@ -16,8 +16,6 @@ dependency_overrides: path: ../neon/neon_notifications nextcloud: path: ../nextcloud - settings: - path: ../settings sort_box: path: ../sort_box wakelock_windows: diff --git a/packages/neon/neon/lib/settings.dart b/packages/neon/neon/lib/settings.dart new file mode 100644 index 00000000..c7a77f97 --- /dev/null +++ b/packages/neon/neon/lib/settings.dart @@ -0,0 +1,6 @@ +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/option_builder.dart'; diff --git a/packages/neon/neon/lib/src/app.dart b/packages/neon/neon/lib/src/app.dart index 51d12b51..bbb4eb77 100644 --- a/packages/neon/neon/lib/src/app.dart +++ b/packages/neon/neon/lib/src/app.dart @@ -13,6 +13,7 @@ import 'package:neon/src/models/account.dart'; import 'package:neon/src/models/push_notification.dart'; import 'package:neon/src/platform/platform.dart'; import 'package:neon/src/router.dart'; +import 'package:neon/src/settings/widgets/option_builder.dart'; import 'package:neon/src/utils/app_implementation.dart'; import 'package:neon/src/utils/global.dart'; import 'package:neon/src/utils/global_options.dart'; @@ -21,7 +22,6 @@ import 'package:neon/src/utils/push_utils.dart'; import 'package:neon/src/utils/theme.dart'; import 'package:provider/provider.dart'; import 'package:quick_actions/quick_actions.dart'; -import 'package:settings/settings.dart'; import 'package:tray_manager/tray_manager.dart' as tray; import 'package:window_manager/window_manager.dart'; diff --git a/packages/neon/neon/lib/src/blocs/accounts.dart b/packages/neon/neon/lib/src/blocs/accounts.dart index 10c62a8c..03ea7c97 100644 --- a/packages/neon/neon/lib/src/blocs/accounts.dart +++ b/packages/neon/neon/lib/src/blocs/accounts.dart @@ -9,11 +9,11 @@ import 'package:neon/src/blocs/user_details.dart'; import 'package:neon/src/blocs/user_statuses.dart'; import 'package:neon/src/models/account.dart'; import 'package:neon/src/platform/platform.dart'; +import 'package:neon/src/settings/models/storage.dart'; import 'package:neon/src/utils/account_options.dart'; import 'package:neon/src/utils/app_implementation.dart'; import 'package:neon/src/utils/global_options.dart'; import 'package:neon/src/utils/request_manager.dart'; -import 'package:neon/src/utils/storage.dart'; import 'package:rxdart/rxdart.dart'; import 'package:shared_preferences/shared_preferences.dart'; diff --git a/packages/neon/neon/lib/src/blocs/apps.dart b/packages/neon/neon/lib/src/blocs/apps.dart index 365fdff8..40e2b210 100644 --- a/packages/neon/neon/lib/src/blocs/apps.dart +++ b/packages/neon/neon/lib/src/blocs/apps.dart @@ -7,8 +7,8 @@ import 'package:neon/src/blocs/accounts.dart'; import 'package:neon/src/blocs/capabilities.dart'; import 'package:neon/src/interfaces/notifications.dart'; import 'package:neon/src/models/account.dart'; +import 'package:neon/src/settings/models/nextcloud_app_options.dart'; import 'package:neon/src/utils/app_implementation.dart'; -import 'package:neon/src/utils/nextcloud_app_specific_options.dart'; import 'package:neon/src/utils/request_manager.dart'; import 'package:nextcloud/nextcloud.dart'; import 'package:provider/provider.dart'; @@ -161,7 +161,7 @@ class AppsBloc extends InteractiveBloc implements AppsBlocEvents, AppsBlocStates BehaviorSubject activeApp = BehaviorSubject(); @override - BehaviorSubject>>> appImplementations = + BehaviorSubject>>> appImplementations = BehaviorSubject>>(); @override diff --git a/packages/neon/neon/lib/src/blocs/push_notifications.dart b/packages/neon/neon/lib/src/blocs/push_notifications.dart index fda53945..9503d40e 100644 --- a/packages/neon/neon/lib/src/blocs/push_notifications.dart +++ b/packages/neon/neon/lib/src/blocs/push_notifications.dart @@ -7,9 +7,9 @@ import 'package:neon/src/blocs/accounts.dart'; import 'package:neon/src/models/account.dart'; import 'package:neon/src/models/push_notification.dart'; import 'package:neon/src/platform/platform.dart'; +import 'package:neon/src/settings/models/storage.dart'; import 'package:neon/src/utils/global_options.dart'; import 'package:neon/src/utils/push_utils.dart'; -import 'package:neon/src/utils/storage.dart'; import 'package:nextcloud/nextcloud.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:unifiedpush/unifiedpush.dart'; diff --git a/packages/neon/neon/lib/src/interfaces/notifications.dart b/packages/neon/neon/lib/src/interfaces/notifications.dart index b1ad2fff..42c93b56 100644 --- a/packages/neon/neon/lib/src/interfaces/notifications.dart +++ b/packages/neon/neon/lib/src/interfaces/notifications.dart @@ -1,6 +1,6 @@ import 'package:neon/src/bloc/bloc.dart'; +import 'package:neon/src/settings/models/nextcloud_app_options.dart'; import 'package:neon/src/utils/app_implementation.dart'; -import 'package:neon/src/utils/nextcloud_app_specific_options.dart'; abstract interface class NotificationsAppInterface extends AppImplementation { @@ -18,6 +18,6 @@ abstract interface class NotificationsBlocInterface extends InteractiveBloc { void deleteNotification(final int id); } -abstract interface class NotificationsOptionsInterface extends NextcloudAppSpecificOptions { +abstract interface class NotificationsOptionsInterface extends NextcloudAppOptions { NotificationsOptionsInterface(super.storage); } diff --git a/packages/neon/neon/lib/src/pages/account_settings.dart b/packages/neon/neon/lib/src/pages/account_settings.dart index 6034f7b2..daebb0fc 100644 --- a/packages/neon/neon/lib/src/pages/account_settings.dart +++ b/packages/neon/neon/lib/src/pages/account_settings.dart @@ -6,11 +6,14 @@ import 'package:neon/src/bloc/result_builder.dart'; import 'package:neon/src/blocs/accounts.dart'; import 'package:neon/src/models/account.dart'; import 'package:neon/src/router.dart'; +import 'package:neon/src/settings/widgets/custom_settings_tile.dart'; +import 'package:neon/src/settings/widgets/dropdown_button_settings_tile.dart'; +import 'package:neon/src/settings/widgets/settings_category.dart'; +import 'package:neon/src/settings/widgets/settings_list.dart'; import 'package:neon/src/utils/confirmation_dialog.dart'; import 'package:neon/src/widgets/exception.dart'; import 'package:neon/src/widgets/linear_progress_indicator.dart'; import 'package:nextcloud/nextcloud.dart'; -import 'package:settings/settings.dart'; class AccountSettingsPage extends StatelessWidget { AccountSettingsPage({ diff --git a/packages/neon/neon/lib/src/pages/home.dart b/packages/neon/neon/lib/src/pages/home.dart index ab6b19b1..2986babf 100644 --- a/packages/neon/neon/lib/src/pages/home.dart +++ b/packages/neon/neon/lib/src/pages/home.dart @@ -6,6 +6,7 @@ import 'package:neon/src/bloc/result_builder.dart'; import 'package:neon/src/blocs/accounts.dart'; import 'package:neon/src/blocs/apps.dart'; import 'package:neon/src/models/account.dart'; +import 'package:neon/src/settings/widgets/option_builder.dart'; import 'package:neon/src/utils/app_implementation.dart'; import 'package:neon/src/utils/global_options.dart'; import 'package:neon/src/utils/global_options.dart' as global_options; @@ -15,7 +16,6 @@ import 'package:neon/src/widgets/drawer.dart'; import 'package:neon/src/widgets/exception.dart'; import 'package:neon/src/widgets/user_avatar.dart'; import 'package:provider/provider.dart'; -import 'package:settings/settings.dart'; const kQuickBarWidth = kAvatarSize + 20; diff --git a/packages/neon/neon/lib/src/pages/nextcloud_app_settings.dart b/packages/neon/neon/lib/src/pages/nextcloud_app_settings.dart index 2fbb760e..20a62489 100644 --- a/packages/neon/neon/lib/src/pages/nextcloud_app_settings.dart +++ b/packages/neon/neon/lib/src/pages/nextcloud_app_settings.dart @@ -1,9 +1,14 @@ import 'package:flutter/material.dart'; import 'package:material_design_icons_flutter/material_design_icons_flutter.dart'; import 'package:neon/l10n/localizations.dart'; +import 'package:neon/src/settings/models/select_option.dart'; +import 'package:neon/src/settings/models/toggle_option.dart'; +import 'package:neon/src/settings/widgets/checkbox_settings_tile.dart'; +import 'package:neon/src/settings/widgets/dropdown_button_settings_tile.dart'; +import 'package:neon/src/settings/widgets/settings_category.dart'; +import 'package:neon/src/settings/widgets/settings_list.dart'; import 'package:neon/src/utils/app_implementation.dart'; import 'package:neon/src/utils/confirmation_dialog.dart'; -import 'package:settings/settings.dart'; class NextcloudAppSettingsPage extends StatelessWidget { const NextcloudAppSettingsPage({ diff --git a/packages/neon/neon/lib/src/pages/settings.dart b/packages/neon/neon/lib/src/pages/settings.dart index ee8bdb1e..6a48c046 100644 --- a/packages/neon/neon/lib/src/pages/settings.dart +++ b/packages/neon/neon/lib/src/pages/settings.dart @@ -9,18 +9,23 @@ import 'package:neon/src/blocs/accounts.dart'; import 'package:neon/src/models/account.dart'; import 'package:neon/src/platform/platform.dart'; import 'package:neon/src/router.dart'; +import 'package:neon/src/settings/widgets/account_settings_tile.dart'; +import 'package:neon/src/settings/widgets/checkbox_settings_tile.dart'; +import 'package:neon/src/settings/widgets/custom_settings_tile.dart'; +import 'package:neon/src/settings/widgets/dropdown_button_settings_tile.dart'; +import 'package:neon/src/settings/widgets/settings_category.dart'; +import 'package:neon/src/settings/widgets/settings_list.dart'; +import 'package:neon/src/settings/widgets/settings_tile.dart'; +import 'package:neon/src/settings/widgets/text_settings_tile.dart'; import 'package:neon/src/utils/app_implementation.dart'; import 'package:neon/src/utils/branding.dart'; import 'package:neon/src/utils/confirmation_dialog.dart'; import 'package:neon/src/utils/global_options.dart'; import 'package:neon/src/utils/save_file.dart'; import 'package:neon/src/utils/settings_export_helper.dart'; -import 'package:neon/src/widgets/account_settings_tile.dart'; import 'package:neon/src/widgets/exception.dart'; -import 'package:neon/src/widgets/text_settings_tile.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:provider/provider.dart'; -import 'package:settings/settings.dart'; class SettingsPage extends StatefulWidget { const SettingsPage({ @@ -137,7 +142,7 @@ class _SettingsPageState extends State { tiles: [ if (pushNotificationsEnabledEnabledSnapshot.hasData && !pushNotificationsEnabledEnabledSnapshot.requireData) ...[ - NeonTextSettingsTile( + TextSettingsTile( text: AppLocalizations.of(context).globalOptionsPushNotificationsEnabledDisabledNotice, style: TextStyle( fontWeight: FontWeight.w600, @@ -194,7 +199,7 @@ class _SettingsPageState extends State { ), ], for (final account in accountsSnapshot.requireData) ...[ - NeonAccountSettingsTile( + AccountSettingsTile( account: account, onTap: () { AccountSettingsRoute(accountid: account.id).go(context); diff --git a/packages/neon/neon/lib/src/utils/nextcloud_app_specific_options.dart b/packages/neon/neon/lib/src/settings/models/nextcloud_app_options.dart similarity index 54% rename from packages/neon/neon/lib/src/utils/nextcloud_app_specific_options.dart rename to packages/neon/neon/lib/src/settings/models/nextcloud_app_options.dart index c7e8cdbc..2f6ceeb9 100644 --- a/packages/neon/neon/lib/src/utils/nextcloud_app_specific_options.dart +++ b/packages/neon/neon/lib/src/settings/models/nextcloud_app_options.dart @@ -1,8 +1,9 @@ -import 'package:neon/src/utils/storage.dart'; -import 'package:settings/settings.dart'; +import 'package:neon/src/settings/models/option.dart'; +import 'package:neon/src/settings/models/options_category.dart'; +import 'package:neon/src/settings/models/storage.dart'; -abstract class NextcloudAppSpecificOptions { - NextcloudAppSpecificOptions(this.storage); +abstract class NextcloudAppOptions { + NextcloudAppOptions(this.storage); final AppStorage storage; late final List categories; diff --git a/packages/settings/lib/src/options/option.dart b/packages/neon/neon/lib/src/settings/models/option.dart similarity index 79% rename from packages/settings/lib/src/options/option.dart rename to packages/neon/neon/lib/src/settings/models/option.dart index 63be2b00..444143f7 100644 --- a/packages/settings/lib/src/options/option.dart +++ b/packages/neon/neon/lib/src/settings/models/option.dart @@ -1,4 +1,10 @@ -part of '../../settings.dart'; +import 'dart:async'; + +import 'package:meta/meta.dart'; +import 'package:neon/src/settings/models/options_category.dart'; +import 'package:neon/src/settings/models/storage.dart'; +import 'package:neon/src/settings/widgets/label_builder.dart'; +import 'package:rxdart/rxdart.dart'; class OptionDisableException implements Exception {} diff --git a/packages/settings/lib/src/options/options_category.dart b/packages/neon/neon/lib/src/settings/models/options_category.dart similarity index 62% rename from packages/settings/lib/src/options/options_category.dart rename to packages/neon/neon/lib/src/settings/models/options_category.dart index d88bdcef..d057552f 100644 --- a/packages/settings/lib/src/options/options_category.dart +++ b/packages/neon/neon/lib/src/settings/models/options_category.dart @@ -1,4 +1,4 @@ -part of '../../settings.dart'; +import 'package:neon/src/settings/widgets/label_builder.dart'; class OptionsCategory { OptionsCategory({ diff --git a/packages/settings/lib/src/options/select_option.dart b/packages/neon/neon/lib/src/settings/models/select_option.dart similarity index 86% rename from packages/settings/lib/src/options/select_option.dart rename to packages/neon/neon/lib/src/settings/models/select_option.dart index 126307d9..9613bd2d 100644 --- a/packages/settings/lib/src/options/select_option.dart +++ b/packages/neon/neon/lib/src/settings/models/select_option.dart @@ -1,4 +1,8 @@ -part of '../../settings.dart'; +import 'dart:async'; + +import 'package:neon/src/settings/models/option.dart'; +import 'package:neon/src/settings/widgets/label_builder.dart'; +import 'package:rxdart/rxdart.dart'; class SelectOption extends Option { SelectOption({ diff --git a/packages/neon/neon/lib/src/utils/storage.dart b/packages/neon/neon/lib/src/settings/models/storage.dart similarity index 80% rename from packages/neon/neon/lib/src/utils/storage.dart rename to packages/neon/neon/lib/src/settings/models/storage.dart index 95e1cf52..973d13ad 100644 --- a/packages/neon/neon/lib/src/utils/storage.dart +++ b/packages/neon/neon/lib/src/settings/models/storage.dart @@ -1,6 +1,16 @@ -import 'package:settings/settings.dart'; import 'package:shared_preferences/shared_preferences.dart'; +abstract interface class SettingsStorage { + String? getString(final String key); + + Future setString(final String key, final String value); + + bool? getBool(final String key); + + // ignore: avoid_positional_boolean_parameters + Future setBool(final String key, final bool value); +} + class AppStorage implements SettingsStorage { AppStorage( this._id, diff --git a/packages/settings/lib/src/options/toggle_option.dart b/packages/neon/neon/lib/src/settings/models/toggle_option.dart similarity index 85% rename from packages/settings/lib/src/options/toggle_option.dart rename to packages/neon/neon/lib/src/settings/models/toggle_option.dart index 1e47d2b8..5b750d0d 100644 --- a/packages/settings/lib/src/options/toggle_option.dart +++ b/packages/neon/neon/lib/src/settings/models/toggle_option.dart @@ -1,4 +1,5 @@ -part of '../../settings.dart'; +import 'package:neon/src/settings/models/option.dart'; +import 'package:rxdart/rxdart.dart'; class ToggleOption extends Option { ToggleOption({ diff --git a/packages/neon/neon/lib/src/widgets/account_settings_tile.dart b/packages/neon/neon/lib/src/settings/widgets/account_settings_tile.dart similarity index 78% rename from packages/neon/neon/lib/src/widgets/account_settings_tile.dart rename to packages/neon/neon/lib/src/settings/widgets/account_settings_tile.dart index a4c38517..d7e6e286 100644 --- a/packages/neon/neon/lib/src/widgets/account_settings_tile.dart +++ b/packages/neon/neon/lib/src/settings/widgets/account_settings_tile.dart @@ -1,10 +1,10 @@ import 'package:flutter/material.dart'; import 'package:neon/src/models/account.dart'; +import 'package:neon/src/settings/widgets/settings_tile.dart'; import 'package:neon/src/widgets/account_tile.dart'; -import 'package:settings/settings.dart'; -class NeonAccountSettingsTile extends SettingsTile { - const NeonAccountSettingsTile({ +class AccountSettingsTile extends SettingsTile { + const AccountSettingsTile({ required this.account, this.color, this.trailing, diff --git a/packages/settings/lib/src/widgets/checkbox_settings_tile.dart b/packages/neon/neon/lib/src/settings/widgets/checkbox_settings_tile.dart similarity index 78% rename from packages/settings/lib/src/widgets/checkbox_settings_tile.dart rename to packages/neon/neon/lib/src/settings/widgets/checkbox_settings_tile.dart index 7bdee8a9..6193d79a 100644 --- a/packages/settings/lib/src/widgets/checkbox_settings_tile.dart +++ b/packages/neon/neon/lib/src/settings/widgets/checkbox_settings_tile.dart @@ -1,4 +1,7 @@ -part of '../../settings.dart'; +import 'package:flutter/material.dart'; +import 'package:neon/src/settings/models/toggle_option.dart'; +import 'package:neon/src/settings/widgets/option_builder.dart'; +import 'package:neon/src/settings/widgets/settings_tile.dart'; class CheckBoxSettingsTile extends InputSettingsTile { const CheckBoxSettingsTile({ diff --git a/packages/settings/lib/src/widgets/custom_settings_tile.dart b/packages/neon/neon/lib/src/settings/widgets/custom_settings_tile.dart similarity index 83% rename from packages/settings/lib/src/widgets/custom_settings_tile.dart rename to packages/neon/neon/lib/src/settings/widgets/custom_settings_tile.dart index 7ed787a5..fd015a5c 100644 --- a/packages/settings/lib/src/widgets/custom_settings_tile.dart +++ b/packages/neon/neon/lib/src/settings/widgets/custom_settings_tile.dart @@ -1,4 +1,5 @@ -part of '../../settings.dart'; +import 'package:flutter/material.dart'; +import 'package:neon/src/settings/widgets/settings_tile.dart'; class CustomSettingsTile extends SettingsTile { const CustomSettingsTile({ diff --git a/packages/settings/lib/src/widgets/dropdown_button_settings_tile.dart b/packages/neon/neon/lib/src/settings/widgets/dropdown_button_settings_tile.dart similarity index 89% rename from packages/settings/lib/src/widgets/dropdown_button_settings_tile.dart rename to packages/neon/neon/lib/src/settings/widgets/dropdown_button_settings_tile.dart index ae5b0a5c..378c9ac1 100644 --- a/packages/settings/lib/src/widgets/dropdown_button_settings_tile.dart +++ b/packages/neon/neon/lib/src/settings/widgets/dropdown_button_settings_tile.dart @@ -1,4 +1,8 @@ -part of '../../settings.dart'; +import 'package:flutter/material.dart'; +import 'package:neon/src/settings/models/select_option.dart'; +import 'package:neon/src/settings/widgets/label_builder.dart'; +import 'package:neon/src/settings/widgets/option_builder.dart'; +import 'package:neon/src/settings/widgets/settings_tile.dart'; class DropdownButtonSettingsTile extends InputSettingsTile> { const DropdownButtonSettingsTile({ diff --git a/packages/settings/lib/src/options/label_builder.dart b/packages/neon/neon/lib/src/settings/widgets/label_builder.dart similarity index 58% rename from packages/settings/lib/src/options/label_builder.dart rename to packages/neon/neon/lib/src/settings/widgets/label_builder.dart index 290d63c6..82baa178 100644 --- a/packages/settings/lib/src/options/label_builder.dart +++ b/packages/neon/neon/lib/src/settings/widgets/label_builder.dart @@ -1,3 +1,3 @@ -part of '../../settings.dart'; +import 'package:flutter/widgets.dart'; typedef LabelBuilder = String Function(BuildContext); diff --git a/packages/settings/lib/src/widgets/option_builder.dart b/packages/neon/neon/lib/src/settings/widgets/option_builder.dart similarity index 85% rename from packages/settings/lib/src/widgets/option_builder.dart rename to packages/neon/neon/lib/src/settings/widgets/option_builder.dart index 2e2e4039..bfd79062 100644 --- a/packages/settings/lib/src/widgets/option_builder.dart +++ b/packages/neon/neon/lib/src/settings/widgets/option_builder.dart @@ -1,4 +1,5 @@ -part of '../../settings.dart'; +import 'package:flutter/widgets.dart'; +import 'package:neon/src/settings/models/option.dart'; typedef OptionBuilderFunction = Widget Function(BuildContext context, T snapshot); diff --git a/packages/settings/lib/src/widgets/settings_category.dart b/packages/neon/neon/lib/src/settings/widgets/settings_category.dart similarity index 79% rename from packages/settings/lib/src/widgets/settings_category.dart rename to packages/neon/neon/lib/src/settings/widgets/settings_category.dart index a1a6c63f..60a35834 100644 --- a/packages/settings/lib/src/widgets/settings_category.dart +++ b/packages/neon/neon/lib/src/settings/widgets/settings_category.dart @@ -1,4 +1,6 @@ -part of '../../settings.dart'; +import 'package:flutter/widgets.dart'; +import 'package:intersperse/intersperse.dart'; +import 'package:neon/src/settings/widgets/settings_tile.dart'; class SettingsCategory extends StatelessWidget { const SettingsCategory({ diff --git a/packages/settings/lib/src/widgets/settings_list.dart b/packages/neon/neon/lib/src/settings/widgets/settings_list.dart similarity index 75% rename from packages/settings/lib/src/widgets/settings_list.dart rename to packages/neon/neon/lib/src/settings/widgets/settings_list.dart index 6622d14e..83570326 100644 --- a/packages/settings/lib/src/widgets/settings_list.dart +++ b/packages/neon/neon/lib/src/settings/widgets/settings_list.dart @@ -1,4 +1,6 @@ -part of '../../settings.dart'; +import 'package:flutter/material.dart'; +import 'package:intersperse/intersperse.dart'; +import 'package:neon/src/settings/widgets/settings_category.dart'; class SettingsList extends StatelessWidget { const SettingsList({ diff --git a/packages/settings/lib/src/widgets/settings_tile.dart b/packages/neon/neon/lib/src/settings/widgets/settings_tile.dart similarity index 74% rename from packages/settings/lib/src/widgets/settings_tile.dart rename to packages/neon/neon/lib/src/settings/widgets/settings_tile.dart index 31744a9f..267eae42 100644 --- a/packages/settings/lib/src/widgets/settings_tile.dart +++ b/packages/neon/neon/lib/src/settings/widgets/settings_tile.dart @@ -1,4 +1,5 @@ -part of '../../settings.dart'; +import 'package:flutter/widgets.dart'; +import 'package:neon/src/settings/models/option.dart'; abstract class SettingsTile extends StatelessWidget { const SettingsTile({ diff --git a/packages/neon/neon/lib/src/widgets/text_settings_tile.dart b/packages/neon/neon/lib/src/settings/widgets/text_settings_tile.dart similarity index 73% rename from packages/neon/neon/lib/src/widgets/text_settings_tile.dart rename to packages/neon/neon/lib/src/settings/widgets/text_settings_tile.dart index 99e5bef6..c4bafb55 100644 --- a/packages/neon/neon/lib/src/widgets/text_settings_tile.dart +++ b/packages/neon/neon/lib/src/settings/widgets/text_settings_tile.dart @@ -1,8 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:settings/settings.dart'; +import 'package:neon/src/settings/widgets/settings_tile.dart'; -class NeonTextSettingsTile extends SettingsTile { - const NeonTextSettingsTile({ +class TextSettingsTile extends SettingsTile { + const TextSettingsTile({ required this.text, this.style, super.key, diff --git a/packages/neon/neon/lib/src/utils/account_options.dart b/packages/neon/neon/lib/src/utils/account_options.dart index 9476949e..7da00ffa 100644 --- a/packages/neon/neon/lib/src/utils/account_options.dart +++ b/packages/neon/neon/lib/src/utils/account_options.dart @@ -2,9 +2,11 @@ import 'dart:async'; import 'package:neon/l10n/localizations.dart'; import 'package:neon/src/blocs/apps.dart'; -import 'package:neon/src/utils/storage.dart'; +import 'package:neon/src/settings/models/option.dart'; +import 'package:neon/src/settings/models/select_option.dart'; +import 'package:neon/src/settings/models/storage.dart'; +import 'package:neon/src/settings/widgets/label_builder.dart'; import 'package:rxdart/rxdart.dart'; -import 'package:settings/settings.dart'; class AccountSpecificOptions { AccountSpecificOptions( diff --git a/packages/neon/neon/lib/src/utils/app_implementation.dart b/packages/neon/neon/lib/src/utils/app_implementation.dart index 19416f48..71ae1bae 100644 --- a/packages/neon/neon/lib/src/utils/app_implementation.dart +++ b/packages/neon/neon/lib/src/utils/app_implementation.dart @@ -6,16 +6,16 @@ import 'package:neon/src/bloc/bloc.dart'; import 'package:neon/src/blocs/accounts.dart'; import 'package:neon/src/models/account.dart'; import 'package:neon/src/platform/platform.dart'; -import 'package:neon/src/utils/nextcloud_app_specific_options.dart'; +import 'package:neon/src/settings/models/nextcloud_app_options.dart'; +import 'package:neon/src/settings/models/storage.dart'; import 'package:neon/src/utils/request_manager.dart'; -import 'package:neon/src/utils/storage.dart'; import 'package:neon/src/widgets/drawer_destination.dart'; import 'package:nextcloud/nextcloud.dart'; import 'package:provider/provider.dart'; import 'package:rxdart/rxdart.dart'; import 'package:shared_preferences/shared_preferences.dart'; -abstract class AppImplementation { +abstract class AppImplementation { AppImplementation( final SharedPreferences sharedPreferences, this.requestManager, diff --git a/packages/neon/neon/lib/src/utils/global_options.dart b/packages/neon/neon/lib/src/utils/global_options.dart index 18c6aecd..dbc84773 100644 --- a/packages/neon/neon/lib/src/utils/global_options.dart +++ b/packages/neon/neon/lib/src/utils/global_options.dart @@ -4,11 +4,14 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:neon/l10n/localizations.dart'; import 'package:neon/src/models/account.dart'; -import 'package:neon/src/utils/storage.dart'; +import 'package:neon/src/settings/models/option.dart'; +import 'package:neon/src/settings/models/select_option.dart'; +import 'package:neon/src/settings/models/storage.dart'; +import 'package:neon/src/settings/models/toggle_option.dart'; +import 'package:neon/src/settings/widgets/label_builder.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:rxdart/rxdart.dart'; -import 'package:settings/settings.dart'; import 'package:shared_preferences/shared_preferences.dart'; const unifiedPushNextPushID = 'org.unifiedpush.distributor.nextpush'; diff --git a/packages/neon/neon/lib/src/utils/push_utils.dart b/packages/neon/neon/lib/src/utils/push_utils.dart index 77347095..f55f5554 100644 --- a/packages/neon/neon/lib/src/utils/push_utils.dart +++ b/packages/neon/neon/lib/src/utils/push_utils.dart @@ -12,10 +12,10 @@ import 'package:neon/src/blocs/accounts.dart'; import 'package:neon/src/models/account.dart'; import 'package:neon/src/models/push_notification.dart'; import 'package:neon/src/platform/platform.dart'; +import 'package:neon/src/settings/models/storage.dart'; import 'package:neon/src/utils/global.dart'; import 'package:neon/src/utils/localizations.dart'; import 'package:neon/src/utils/request_manager.dart'; -import 'package:neon/src/utils/storage.dart'; import 'package:neon/src/utils/theme.dart'; import 'package:nextcloud/nextcloud.dart'; import 'package:shared_preferences/shared_preferences.dart'; diff --git a/packages/neon/neon/lib/src/utils/settings_export_helper.dart b/packages/neon/neon/lib/src/utils/settings_export_helper.dart index 32fb7678..13029683 100644 --- a/packages/neon/neon/lib/src/utils/settings_export_helper.dart +++ b/packages/neon/neon/lib/src/utils/settings_export_helper.dart @@ -1,7 +1,7 @@ import 'package:neon/src/models/account.dart'; +import 'package:neon/src/settings/models/option.dart'; import 'package:neon/src/utils/app_implementation.dart'; import 'package:neon/src/utils/global_options.dart'; -import 'package:settings/settings.dart'; class SettingsExportHelper { SettingsExportHelper({ diff --git a/packages/neon/neon/lib/src/utils/sort_box_builder.dart b/packages/neon/neon/lib/src/utils/sort_box_builder.dart index 19203579..e52eacb9 100644 --- a/packages/neon/neon/lib/src/utils/sort_box_builder.dart +++ b/packages/neon/neon/lib/src/utils/sort_box_builder.dart @@ -1,5 +1,6 @@ import 'package:flutter/widgets.dart'; -import 'package:settings/settings.dart'; +import 'package:neon/src/settings/models/select_option.dart'; +import 'package:neon/src/settings/widgets/option_builder.dart'; import 'package:sort_box/sort_box.dart'; class SortBoxBuilder extends StatelessWidget { diff --git a/packages/neon/neon/lib/src/utils/sort_box_order_option_values.dart b/packages/neon/neon/lib/src/utils/sort_box_order_option_values.dart index 6ef6c9d2..f6f4d5c5 100644 --- a/packages/neon/neon/lib/src/utils/sort_box_order_option_values.dart +++ b/packages/neon/neon/lib/src/utils/sort_box_order_option_values.dart @@ -1,5 +1,5 @@ import 'package:neon/l10n/localizations.dart'; -import 'package:settings/settings.dart'; +import 'package:neon/src/settings/widgets/label_builder.dart'; import 'package:sort_box/sort_box.dart'; final sortBoxOrderOptionValues = { diff --git a/packages/neon/neon/lib/utils.dart b/packages/neon/neon/lib/utils.dart index 69328103..02ae85a9 100644 --- a/packages/neon/neon/lib/utils.dart +++ b/packages/neon/neon/lib/utils.dart @@ -3,10 +3,8 @@ export 'package:neon/src/utils/branding.dart'; export 'package:neon/src/utils/confirmation_dialog.dart'; export 'package:neon/src/utils/exceptions.dart'; export 'package:neon/src/utils/hex_color.dart'; -export 'package:neon/src/utils/nextcloud_app_specific_options.dart'; export 'package:neon/src/utils/rename_dialog.dart'; export 'package:neon/src/utils/request_manager.dart'; export 'package:neon/src/utils/sort_box_builder.dart'; export 'package:neon/src/utils/sort_box_order_option_values.dart'; -export 'package:neon/src/utils/storage.dart'; export 'package:neon/src/utils/validators.dart'; diff --git a/packages/neon/neon/pubspec.yaml b/packages/neon/neon/pubspec.yaml index e6b18cd3..2a90e42e 100644 --- a/packages/neon/neon/pubspec.yaml +++ b/packages/neon/neon/pubspec.yaml @@ -23,6 +23,7 @@ dependencies: flutter_svg: ^2.0.5 go_router: ^8.0.3 http: ^0.13.6 + intersperse: ^2.0.0 intl: ^0.18.0 json_annotation: ^4.8.1 material_design_icons_flutter: ^7.0.7296 @@ -38,10 +39,6 @@ dependencies: provider: ^6.0.5 quick_actions: ^1.0.3 rxdart: ^0.27.7 - settings: - git: - url: https://github.com/provokateurin/nextcloud-neon - path: packages/settings shared_preferences: ^2.1.1 sort_box: git: diff --git a/packages/neon/neon/pubspec_overrides.yaml b/packages/neon/neon/pubspec_overrides.yaml index 13ab86cb..fa3b7c95 100644 --- a/packages/neon/neon/pubspec_overrides.yaml +++ b/packages/neon/neon/pubspec_overrides.yaml @@ -1,11 +1,9 @@ -# melos_managed_dependency_overrides: dynamite_runtime,nextcloud,settings,sort_box,wakelock_windows +# melos_managed_dependency_overrides: dynamite_runtime,nextcloud,sort_box,wakelock_windows dependency_overrides: dynamite_runtime: path: ../../dynamite/dynamite_runtime nextcloud: path: ../../nextcloud - settings: - path: ../../settings sort_box: path: ../../sort_box wakelock_windows: diff --git a/packages/neon/neon_files/lib/neon_files.dart b/packages/neon/neon_files/lib/neon_files.dart index bfdb9a84..51d94161 100644 --- a/packages/neon/neon_files/lib/neon_files.dart +++ b/packages/neon/neon_files/lib/neon_files.dart @@ -15,6 +15,7 @@ import 'package:material_design_icons_flutter/material_design_icons_flutter.dart import 'package:neon/blocs.dart'; import 'package:neon/models.dart'; import 'package:neon/platform.dart'; +import 'package:neon/settings.dart'; import 'package:neon/utils.dart'; import 'package:neon/widgets.dart'; import 'package:neon_files/l10n/localizations.dart'; @@ -24,7 +25,6 @@ import 'package:path/path.dart' as p; import 'package:provider/provider.dart'; import 'package:queue/queue.dart'; import 'package:rxdart/rxdart.dart'; -import 'package:settings/settings.dart'; import 'package:sort_box/sort_box.dart'; part 'blocs/browser.dart'; diff --git a/packages/neon/neon_files/lib/options.dart b/packages/neon/neon_files/lib/options.dart index efd49f89..83666f08 100644 --- a/packages/neon/neon_files/lib/options.dart +++ b/packages/neon/neon_files/lib/options.dart @@ -1,6 +1,6 @@ part of 'neon_files.dart'; -class FilesAppSpecificOptions extends NextcloudAppSpecificOptions { +class FilesAppSpecificOptions extends NextcloudAppOptions { FilesAppSpecificOptions(super.storage) { super.categories = [ generalCategory, diff --git a/packages/neon/neon_files/pubspec.yaml b/packages/neon/neon_files/pubspec.yaml index 48a16b84..813944b6 100644 --- a/packages/neon/neon_files/pubspec.yaml +++ b/packages/neon/neon_files/pubspec.yaml @@ -32,10 +32,6 @@ dependencies: provider: ^6.0.5 queue: ^3.1.0+2 rxdart: ^0.27.7 - settings: - git: - url: https://github.com/provokateurin/nextcloud-neon - path: packages/settings share_plus: ^7.0.0 sort_box: git: diff --git a/packages/neon/neon_files/pubspec_overrides.yaml b/packages/neon/neon_files/pubspec_overrides.yaml index 5c50df51..478e62f5 100644 --- a/packages/neon/neon_files/pubspec_overrides.yaml +++ b/packages/neon/neon_files/pubspec_overrides.yaml @@ -1,4 +1,4 @@ -# melos_managed_dependency_overrides: dynamite_runtime,file_icons,neon,nextcloud,settings,sort_box +# melos_managed_dependency_overrides: dynamite_runtime,file_icons,neon,nextcloud,sort_box dependency_overrides: dynamite_runtime: path: ../../dynamite/dynamite_runtime @@ -8,7 +8,5 @@ dependency_overrides: path: ../neon nextcloud: path: ../../nextcloud - settings: - path: ../../settings sort_box: path: ../../sort_box diff --git a/packages/neon/neon_news/lib/neon_news.dart b/packages/neon/neon_news/lib/neon_news.dart index e4ea8a18..d81d1881 100644 --- a/packages/neon/neon_news/lib/neon_news.dart +++ b/packages/neon/neon_news/lib/neon_news.dart @@ -11,13 +11,13 @@ import 'package:material_design_icons_flutter/material_design_icons_flutter.dart import 'package:neon/blocs.dart'; import 'package:neon/models.dart'; import 'package:neon/platform.dart'; +import 'package:neon/settings.dart'; import 'package:neon/utils.dart'; import 'package:neon/widgets.dart'; import 'package:neon_news/l10n/localizations.dart'; import 'package:nextcloud/nextcloud.dart'; import 'package:provider/provider.dart'; import 'package:rxdart/rxdart.dart'; -import 'package:settings/settings.dart'; import 'package:share_plus/share_plus.dart'; import 'package:sort_box/sort_box.dart'; import 'package:url_launcher/url_launcher_string.dart'; diff --git a/packages/neon/neon_news/lib/options.dart b/packages/neon/neon_news/lib/options.dart index c619d2ce..384255b5 100644 --- a/packages/neon/neon_news/lib/options.dart +++ b/packages/neon/neon_news/lib/options.dart @@ -1,6 +1,6 @@ part of 'neon_news.dart'; -class NewsAppSpecificOptions extends NextcloudAppSpecificOptions { +class NewsAppSpecificOptions extends NextcloudAppOptions { NewsAppSpecificOptions(super.storage, final NeonPlatform platform) { super.categories = [ generalCategory, diff --git a/packages/neon/neon_news/pubspec.yaml b/packages/neon/neon_news/pubspec.yaml index 4a999997..157b47ef 100644 --- a/packages/neon/neon_news/pubspec.yaml +++ b/packages/neon/neon_news/pubspec.yaml @@ -22,10 +22,6 @@ dependencies: path: packages/nextcloud provider: ^6.0.5 rxdart: ^0.27.7 - settings: - git: - url: https://github.com/provokateurin/nextcloud-neon - path: packages/settings share_plus: ^7.0.0 sort_box: git: diff --git a/packages/neon/neon_news/pubspec_overrides.yaml b/packages/neon/neon_news/pubspec_overrides.yaml index fde2996c..807ec964 100644 --- a/packages/neon/neon_news/pubspec_overrides.yaml +++ b/packages/neon/neon_news/pubspec_overrides.yaml @@ -1,4 +1,4 @@ -# melos_managed_dependency_overrides: dynamite_runtime,neon,nextcloud,settings,sort_box,wakelock_windows +# melos_managed_dependency_overrides: dynamite_runtime,neon,nextcloud,sort_box,wakelock_windows dependency_overrides: dynamite_runtime: path: ../../dynamite/dynamite_runtime @@ -6,8 +6,6 @@ dependency_overrides: path: ../neon nextcloud: path: ../../nextcloud - settings: - path: ../../settings sort_box: path: ../../sort_box wakelock_windows: diff --git a/packages/neon/neon_notes/lib/neon_notes.dart b/packages/neon/neon_notes/lib/neon_notes.dart index eb09072e..a908c4d3 100644 --- a/packages/neon/neon_notes/lib/neon_notes.dart +++ b/packages/neon/neon_notes/lib/neon_notes.dart @@ -11,6 +11,7 @@ import 'package:material_design_icons_flutter/material_design_icons_flutter.dart import 'package:neon/blocs.dart'; import 'package:neon/models.dart'; import 'package:neon/platform.dart'; +import 'package:neon/settings.dart'; import 'package:neon/utils.dart'; import 'package:neon/widgets.dart'; import 'package:neon_notes/l10n/localizations.dart'; @@ -18,7 +19,6 @@ import 'package:nextcloud/nextcloud.dart'; import 'package:provider/provider.dart'; import 'package:queue/queue.dart'; import 'package:rxdart/rxdart.dart'; -import 'package:settings/settings.dart'; import 'package:sort_box/sort_box.dart'; import 'package:url_launcher/url_launcher_string.dart'; import 'package:wakelock/wakelock.dart'; diff --git a/packages/neon/neon_notes/lib/options.dart b/packages/neon/neon_notes/lib/options.dart index b3c2fefa..324f7f94 100644 --- a/packages/neon/neon_notes/lib/options.dart +++ b/packages/neon/neon_notes/lib/options.dart @@ -1,6 +1,6 @@ part of 'neon_notes.dart'; -class NotesAppSpecificOptions extends NextcloudAppSpecificOptions { +class NotesAppSpecificOptions extends NextcloudAppOptions { NotesAppSpecificOptions(super.storage) { super.categories = [ generalCategory, diff --git a/packages/neon/neon_notes/pubspec.yaml b/packages/neon/neon_notes/pubspec.yaml index 04cba12e..4c50e577 100644 --- a/packages/neon/neon_notes/pubspec.yaml +++ b/packages/neon/neon_notes/pubspec.yaml @@ -24,10 +24,6 @@ dependencies: provider: ^6.0.5 queue: ^3.1.0+2 rxdart: ^0.27.7 - settings: - git: - url: https://github.com/provokateurin/nextcloud-neon - path: packages/settings sort_box: git: url: https://github.com/provokateurin/nextcloud-neon diff --git a/packages/neon/neon_notes/pubspec_overrides.yaml b/packages/neon/neon_notes/pubspec_overrides.yaml index fde2996c..807ec964 100644 --- a/packages/neon/neon_notes/pubspec_overrides.yaml +++ b/packages/neon/neon_notes/pubspec_overrides.yaml @@ -1,4 +1,4 @@ -# melos_managed_dependency_overrides: dynamite_runtime,neon,nextcloud,settings,sort_box,wakelock_windows +# melos_managed_dependency_overrides: dynamite_runtime,neon,nextcloud,sort_box,wakelock_windows dependency_overrides: dynamite_runtime: path: ../../dynamite/dynamite_runtime @@ -6,8 +6,6 @@ dependency_overrides: path: ../neon nextcloud: path: ../../nextcloud - settings: - path: ../../settings sort_box: path: ../../sort_box wakelock_windows: diff --git a/packages/neon/neon_notifications/lib/neon_notifications.dart b/packages/neon/neon_notifications/lib/neon_notifications.dart index 326ddcc9..68eabe14 100644 --- a/packages/neon/neon_notifications/lib/neon_notifications.dart +++ b/packages/neon/neon_notifications/lib/neon_notifications.dart @@ -7,6 +7,7 @@ import 'package:material_design_icons_flutter/material_design_icons_flutter.dart import 'package:neon/blocs.dart'; import 'package:neon/interfaces.dart'; import 'package:neon/models.dart'; +import 'package:neon/settings.dart'; import 'package:neon/utils.dart'; import 'package:neon/widgets.dart'; import 'package:neon_notifications/l10n/localizations.dart'; diff --git a/packages/neon/neon_notifications/lib/options.dart b/packages/neon/neon_notifications/lib/options.dart index a897b3ff..101572d4 100644 --- a/packages/neon/neon_notifications/lib/options.dart +++ b/packages/neon/neon_notifications/lib/options.dart @@ -1,6 +1,6 @@ part of 'neon_notifications.dart'; -class NotificationsAppSpecificOptions extends NextcloudAppSpecificOptions implements NotificationsOptionsInterface { +class NotificationsAppSpecificOptions extends NextcloudAppOptions implements NotificationsOptionsInterface { NotificationsAppSpecificOptions(super.storage) { super.categories = []; super.options = []; diff --git a/packages/neon/neon_notifications/pubspec_overrides.yaml b/packages/neon/neon_notifications/pubspec_overrides.yaml index 7b4559d5..bc921fe9 100644 --- a/packages/neon/neon_notifications/pubspec_overrides.yaml +++ b/packages/neon/neon_notifications/pubspec_overrides.yaml @@ -1,4 +1,4 @@ -# melos_managed_dependency_overrides: dynamite_runtime,neon,nextcloud,settings,sort_box +# melos_managed_dependency_overrides: dynamite_runtime,neon,nextcloud,sort_box dependency_overrides: dynamite_runtime: path: ../../dynamite/dynamite_runtime @@ -6,7 +6,5 @@ dependency_overrides: path: ../neon nextcloud: path: ../../nextcloud - settings: - path: ../../settings sort_box: path: ../../sort_box diff --git a/packages/settings/.gitignore b/packages/settings/.gitignore deleted file mode 100644 index 96486fd9..00000000 --- a/packages/settings/.gitignore +++ /dev/null @@ -1,30 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ -migrate_working_dir/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. -/pubspec.lock -**/doc/api/ -.dart_tool/ -.packages -build/ diff --git a/packages/settings/.metadata b/packages/settings/.metadata deleted file mode 100644 index 16d0a66a..00000000 --- a/packages/settings/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: 7a2b187c7bc47de1578992a225e64bbc6ad1eb4a - channel: master - -project_type: package diff --git a/packages/settings/LICENSE b/packages/settings/LICENSE deleted file mode 120000 index 30cff740..00000000 --- a/packages/settings/LICENSE +++ /dev/null @@ -1 +0,0 @@ -../../LICENSE \ No newline at end of file diff --git a/packages/settings/README.md b/packages/settings/README.md deleted file mode 100644 index f03d3bd9..00000000 --- a/packages/settings/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# settings - -A framework for modular settings in Flutter. diff --git a/packages/settings/analysis_options.yaml b/packages/settings/analysis_options.yaml deleted file mode 100644 index c7c10b7d..00000000 --- a/packages/settings/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -include: package:nit_picking/flutter.yaml diff --git a/packages/settings/lib/settings.dart b/packages/settings/lib/settings.dart deleted file mode 100644 index 1682bcf9..00000000 --- a/packages/settings/lib/settings.dart +++ /dev/null @@ -1,21 +0,0 @@ -library settings; - -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:intersperse/intersperse.dart'; -import 'package:rxdart/rxdart.dart'; - -part 'src/options/label_builder.dart'; -part 'src/options/option.dart'; -part 'src/options/options_category.dart'; -part 'src/options/select_option.dart'; -part 'src/options/toggle_option.dart'; -part 'src/storage/storage.dart'; -part 'src/widgets/checkbox_settings_tile.dart'; -part 'src/widgets/custom_settings_tile.dart'; -part 'src/widgets/dropdown_button_settings_tile.dart'; -part 'src/widgets/option_builder.dart'; -part 'src/widgets/settings_category.dart'; -part 'src/widgets/settings_list.dart'; -part 'src/widgets/settings_tile.dart'; diff --git a/packages/settings/lib/src/storage/storage.dart b/packages/settings/lib/src/storage/storage.dart deleted file mode 100644 index f6877174..00000000 --- a/packages/settings/lib/src/storage/storage.dart +++ /dev/null @@ -1,12 +0,0 @@ -part of '../../settings.dart'; - -abstract interface class SettingsStorage { - String? getString(final String key); - - Future setString(final String key, final String value); - - bool? getBool(final String key); - - // ignore: avoid_positional_boolean_parameters - Future setBool(final String key, final bool value); -} diff --git a/packages/settings/pubspec.yaml b/packages/settings/pubspec.yaml deleted file mode 100644 index 5adc2c2f..00000000 --- a/packages/settings/pubspec.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: settings -version: 1.0.0 - -environment: - sdk: '>=3.0.0 <4.0.0' - flutter: '>=3.10.4' - -dependencies: - flutter: - sdk: flutter - intersperse: ^2.0.0 - rxdart: ^0.27.7 - -dev_dependencies: - nit_picking: - git: - url: https://github.com/stack11/dart_nit_picking - ref: 0b2ee0d