From 32311c5d08e206e4df54182689d7aa810f9151c9 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sat, 1 Jul 2023 13:50:59 +0200 Subject: [PATCH] neon: Split everything into separate libraries --- .../app/integration_test/screenshot_test.dart | 1 + packages/app/lib/apps.dart | 3 +- packages/app/lib/branding.dart | 2 +- packages/neon/neon/lib/blocs.dart | 5 + packages/neon/neon/lib/interfaces.dart | 1 + packages/neon/neon/lib/models.dart | 1 + packages/neon/neon/lib/neon.dart | 106 ++---------------- packages/neon/neon/lib/platform.dart | 1 + packages/neon/neon/lib/src/app.dart | 27 ++++- .../neon/neon/lib/src/blocs/accounts.dart | 19 +++- packages/neon/neon/lib/src/blocs/apps.dart | 16 ++- packages/neon/neon/lib/src/blocs/blocs.dart | 23 ---- .../neon/neon/lib/src/blocs/capabilities.dart | 9 +- .../neon/neon/lib/src/blocs/first_launch.dart | 6 +- packages/neon/neon/lib/src/blocs/login.dart | 9 +- .../neon/neon/lib/src/blocs/next_push.dart | 9 +- .../lib/src/blocs/push_notifications.dart | 16 ++- packages/neon/neon/lib/src/blocs/timer.dart | 6 +- .../neon/neon/lib/src/blocs/user_details.dart | 9 +- .../neon/lib/src/blocs/user_statuses.dart | 12 +- .../lib/src/interfaces/notifications.dart | 4 +- .../neon/lib/src/pages/account_settings.dart | 14 ++- packages/neon/neon/lib/src/pages/home.dart | 23 +++- packages/neon/neon/lib/src/pages/login.dart | 19 +++- .../lib/src/pages/nextcloud_app_settings.dart | 7 +- .../neon/neon/lib/src/pages/settings.dart | 24 +++- .../neon/neon/lib/src/platform/abstract.dart | 36 ------ .../neon/neon/lib/src/platform/android.dart | 6 +- .../neon/neon/lib/src/platform/linux.dart | 7 +- .../neon/neon/lib/src/platform/platform.dart | 40 ++++++- packages/neon/neon/lib/src/router.dart | 10 +- .../neon/lib/src/utils/account_options.dart | 8 +- .../lib/src/utils/app_implementation.dart | 17 ++- packages/neon/neon/lib/src/utils/bloc.dart | 5 +- .../neon/neon/lib/src/utils/branding.dart | 2 +- .../lib/src/utils/confirmation_dialog.dart | 3 +- .../neon/neon/lib/src/utils/exceptions.dart | 2 +- packages/neon/neon/lib/src/utils/global.dart | 2 +- .../neon/lib/src/utils/global_options.dart | 13 ++- .../neon/lib/src/utils/global_popups.dart | 9 +- .../neon/neon/lib/src/utils/hex_color.dart | 2 +- .../neon/lib/src/utils/localizations.dart | 5 +- .../utils/nextcloud_app_specific_options.dart | 3 +- .../neon/neon/lib/src/utils/push_utils.dart | 22 +++- .../neon/lib/src/utils/rename_dialog.dart | 4 +- .../neon/lib/src/utils/request_manager.dart | 11 +- packages/neon/neon/lib/src/utils/result.dart | 2 +- .../neon/neon/lib/src/utils/save_file.dart | 6 +- .../lib/src/utils/settings_export_helper.dart | 5 +- .../neon/lib/src/utils/sort_box_builder.dart | 4 +- .../utils/sort_box_order_option_values.dart | 4 +- packages/neon/neon/lib/src/utils/storage.dart | 3 +- .../neon/lib/src/utils/stream_listenable.dart | 5 +- packages/neon/neon/lib/src/utils/theme.dart | 4 +- .../neon/neon/lib/src/utils/validators.dart | 3 +- .../src/widgets/account_settings_tile.dart | 5 +- .../neon/lib/src/widgets/account_tile.dart | 10 +- .../neon/neon/lib/src/widgets/app_bar.dart | 11 +- .../src/widgets/app_implementation_icon.dart | 4 +- .../neon/lib/src/widgets/cached_image.dart | 10 +- .../neon/neon/lib/src/widgets/dialog.dart | 2 +- .../neon/neon/lib/src/widgets/drawer.dart | 11 +- .../lib/src/widgets/drawer_destination.dart | 2 +- .../neon/neon/lib/src/widgets/exception.dart | 12 +- .../neon/lib/src/widgets/image_wrapper.dart | 2 +- .../widgets/linear_progress_indicator.dart | 2 +- .../neon/neon/lib/src/widgets/list_view.dart | 4 +- .../neon/lib/src/widgets/nextcloud_logo.dart | 3 +- .../neon/lib/src/widgets/relative_time.dart | 2 +- .../neon/lib/src/widgets/result_builder.dart | 4 +- .../lib/src/widgets/text_settings_tile.dart | 3 +- .../neon/lib/src/widgets/user_avatar.dart | 12 +- packages/neon/neon/lib/utils.dart | 14 +++ packages/neon/neon/lib/widgets.dart | 8 ++ packages/neon/neon/test/hex_color_test.dart | 2 +- packages/neon/neon/test/result_test.dart | 2 +- packages/neon/neon/test/timer_bloc_test.dart | 2 +- packages/neon/neon_files/lib/neon_files.dart | 6 +- packages/neon/neon_news/lib/neon_news.dart | 6 +- packages/neon/neon_notes/lib/neon_notes.dart | 6 +- .../lib/neon_notifications.dart | 6 +- 81 files changed, 537 insertions(+), 229 deletions(-) create mode 100644 packages/neon/neon/lib/blocs.dart create mode 100644 packages/neon/neon/lib/interfaces.dart create mode 100644 packages/neon/neon/lib/models.dart create mode 100644 packages/neon/neon/lib/platform.dart delete mode 100644 packages/neon/neon/lib/src/blocs/blocs.dart delete mode 100644 packages/neon/neon/lib/src/platform/abstract.dart create mode 100644 packages/neon/neon/lib/utils.dart create mode 100644 packages/neon/neon/lib/widgets.dart diff --git a/packages/app/integration_test/screenshot_test.dart b/packages/app/integration_test/screenshot_test.dart index 064af93d..63b56b01 100644 --- a/packages/app/integration_test/screenshot_test.dart +++ b/packages/app/integration_test/screenshot_test.dart @@ -7,6 +7,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:material_design_icons_flutter/material_design_icons_flutter.dart'; +import 'package:neon/models.dart'; import 'package:neon/neon.dart'; import 'package:neon_files/neon_files.dart'; import 'package:shared_preferences/shared_preferences.dart'; diff --git a/packages/app/lib/apps.dart b/packages/app/lib/apps.dart index 59c00def..a217459a 100644 --- a/packages/app/lib/apps.dart +++ b/packages/app/lib/apps.dart @@ -1,4 +1,5 @@ -import 'package:neon/neon.dart'; +import 'package:neon/platform.dart'; +import 'package:neon/utils.dart'; import 'package:neon_files/neon_files.dart'; import 'package:neon_news/neon_news.dart'; import 'package:neon_notes/neon_notes.dart'; diff --git a/packages/app/lib/branding.dart b/packages/app/lib/branding.dart index 460403f6..c0af422b 100644 --- a/packages/app/lib/branding.dart +++ b/packages/app/lib/branding.dart @@ -1,5 +1,5 @@ import 'package:flutter_svg/flutter_svg.dart'; -import 'package:neon/neon.dart'; +import 'package:neon/utils.dart'; Branding getNeonBranding() => Branding( name: 'Nextcloud Neon', diff --git a/packages/neon/neon/lib/blocs.dart b/packages/neon/neon/lib/blocs.dart new file mode 100644 index 00000000..e160c0d7 --- /dev/null +++ b/packages/neon/neon/lib/blocs.dart @@ -0,0 +1,5 @@ +export 'package:neon/src/bloc/bloc.dart'; +export 'package:neon/src/bloc/result.dart'; +export 'package:neon/src/bloc/result_builder.dart'; +export 'package:neon/src/blocs/accounts.dart'; // TODO: Remove access to the AccountsBloc. Apps should not need to access this +export 'package:neon/src/blocs/timer.dart'; diff --git a/packages/neon/neon/lib/interfaces.dart b/packages/neon/neon/lib/interfaces.dart new file mode 100644 index 00000000..45a240ce --- /dev/null +++ b/packages/neon/neon/lib/interfaces.dart @@ -0,0 +1 @@ +export 'package:neon/src/interfaces/notifications.dart'; diff --git a/packages/neon/neon/lib/models.dart b/packages/neon/neon/lib/models.dart new file mode 100644 index 00000000..8ef9a91d --- /dev/null +++ b/packages/neon/neon/lib/models.dart @@ -0,0 +1 @@ +export 'package:neon/src/models/account.dart'; diff --git a/packages/neon/neon/lib/neon.dart b/packages/neon/neon/lib/neon.dart index ccf4aab4..f671b6aa 100644 --- a/packages/neon/neon/lib/neon.dart +++ b/packages/neon/neon/lib/neon.dart @@ -1,107 +1,21 @@ -library neon; - import 'dart:async'; -import 'dart:convert'; -import 'dart:io'; -import 'dart:ui'; -import 'package:bitmap/bitmap.dart'; -import 'package:collection/collection.dart'; -import 'package:crypto/crypto.dart'; -import 'package:file_picker/file_picker.dart'; -import 'package:filesize/filesize.dart'; -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter_cache_manager/flutter_cache_manager.dart'; -import 'package:flutter_file_dialog/flutter_file_dialog.dart'; -import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter_native_splash/flutter_native_splash.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:http/http.dart'; -import 'package:intl/intl_standalone.dart'; -import 'package:material_design_icons_flutter/material_design_icons_flutter.dart'; -import 'package:neon/l10n/localizations.dart'; -import 'package:neon/src/blocs/blocs.dart'; +import 'package:neon/src/app.dart'; +import 'package:neon/src/blocs/accounts.dart'; +import 'package:neon/src/blocs/first_launch.dart'; +import 'package:neon/src/blocs/next_push.dart'; +import 'package:neon/src/blocs/push_notifications.dart'; import 'package:neon/src/models/account.dart'; -import 'package:neon/src/models/push_notification.dart'; -import 'package:neon/src/router.dart'; -import 'package:neon/src/widgets/app_bar.dart'; -import 'package:neon/src/widgets/drawer.dart'; -import 'package:neon/src/widgets/drawer_destination.dart'; -import 'package:nextcloud/nextcloud.dart'; +import 'package:neon/src/platform/platform.dart'; +import 'package:neon/src/utils/app_implementation.dart'; +import 'package:neon/src/utils/branding.dart'; +import 'package:neon/src/utils/global_options.dart'; +import 'package:neon/src/utils/request_manager.dart'; import 'package:package_info_plus/package_info_plus.dart'; -import 'package:path/path.dart' as p; -import 'package:path_provider/path_provider.dart'; -import 'package:permission_handler/permission_handler.dart'; import 'package:provider/provider.dart'; -import 'package:quick_actions/quick_actions.dart'; -import 'package:rxdart/rxdart.dart'; -import 'package:settings/settings.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import 'package:sort_box/sort_box.dart'; -import 'package:sqflite/sqflite.dart'; -import 'package:sqflite_common_ffi/sqflite_ffi.dart'; -import 'package:tray_manager/tray_manager.dart' as tray; -import 'package:url_launcher/url_launcher_string.dart'; -import 'package:webview_flutter/webview_flutter.dart'; -import 'package:window_manager/window_manager.dart'; -import 'package:xdg_directories/xdg_directories.dart' as xdg; -import 'package:xml/xml.dart' as xml; - -export 'src/blocs/blocs.dart'; -export 'src/models/account.dart'; -export 'src/models/push_notification.dart'; - -part 'src/app.dart'; -part 'src/interfaces/notifications.dart'; -part 'src/pages/account_settings.dart'; -part 'src/pages/home.dart'; -part 'src/pages/login.dart'; -part 'src/pages/nextcloud_app_settings.dart'; -part 'src/pages/settings.dart'; -part 'src/platform/abstract.dart'; -part 'src/platform/android.dart'; -part 'src/platform/linux.dart'; -part 'src/platform/platform.dart'; -part 'src/utils/account_options.dart'; -part 'src/utils/app_implementation.dart'; -part 'src/utils/bloc.dart'; -part 'src/utils/branding.dart'; -part 'src/utils/confirmation_dialog.dart'; -part 'src/utils/exceptions.dart'; -part 'src/utils/global.dart'; -part 'src/utils/global_options.dart'; -part 'src/utils/global_popups.dart'; -part 'src/utils/hex_color.dart'; -part 'src/utils/localizations.dart'; -part 'src/utils/nextcloud_app_specific_options.dart'; -part 'src/utils/push_utils.dart'; -part 'src/utils/rename_dialog.dart'; -part 'src/utils/request_manager.dart'; -part 'src/utils/result.dart'; -part 'src/utils/save_file.dart'; -part 'src/utils/settings_export_helper.dart'; -part 'src/utils/sort_box_builder.dart'; -part 'src/utils/sort_box_order_option_values.dart'; -part 'src/utils/storage.dart'; -part 'src/utils/stream_listenable.dart'; -part 'src/utils/theme.dart'; -part 'src/utils/validators.dart'; -part 'src/widgets/account_settings_tile.dart'; -part 'src/widgets/account_tile.dart'; -part 'src/widgets/app_implementation_icon.dart'; -part 'src/widgets/cached_image.dart'; -part 'src/widgets/dialog.dart'; -part 'src/widgets/exception.dart'; -part 'src/widgets/image_wrapper.dart'; -part 'src/widgets/linear_progress_indicator.dart'; -part 'src/widgets/list_view.dart'; -part 'src/widgets/nextcloud_logo.dart'; -part 'src/widgets/relative_time.dart'; -part 'src/widgets/result_builder.dart'; -part 'src/widgets/text_settings_tile.dart'; -part 'src/widgets/user_avatar.dart'; Future runNeon({ required final Iterable Function(SharedPreferences, RequestManager, NeonPlatform) diff --git a/packages/neon/neon/lib/platform.dart b/packages/neon/neon/lib/platform.dart new file mode 100644 index 00000000..b1b26727 --- /dev/null +++ b/packages/neon/neon/lib/platform.dart @@ -0,0 +1 @@ +export 'package:neon/src/platform/platform.dart'; diff --git a/packages/neon/neon/lib/src/app.dart b/packages/neon/neon/lib/src/app.dart index 36073816..e3e5dbed 100644 --- a/packages/neon/neon/lib/src/app.dart +++ b/packages/neon/neon/lib/src/app.dart @@ -1,4 +1,29 @@ -part of '../../neon.dart'; +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; + +import 'package:flutter/material.dart'; +import 'package:flutter_native_splash/flutter_native_splash.dart'; +import 'package:neon/l10n/localizations.dart'; +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/models/push_notification.dart'; +import 'package:neon/src/platform/platform.dart'; +import 'package:neon/src/router.dart'; +import 'package:neon/src/utils/app_implementation.dart'; +import 'package:neon/src/utils/global.dart'; +import 'package:neon/src/utils/global_options.dart'; +import 'package:neon/src/utils/localizations.dart'; +import 'package:neon/src/utils/push_utils.dart'; +import 'package:neon/src/utils/theme.dart'; +import 'package:neon/src/widgets/result_builder.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'; class NeonApp extends StatefulWidget { const NeonApp({ diff --git a/packages/neon/neon/lib/src/blocs/accounts.dart b/packages/neon/neon/lib/src/blocs/accounts.dart index c130ee00..3712d7f3 100644 --- a/packages/neon/neon/lib/src/blocs/accounts.dart +++ b/packages/neon/neon/lib/src/blocs/accounts.dart @@ -1,4 +1,21 @@ -part of 'blocs.dart'; +import 'dart:async'; +import 'dart:convert'; + +import 'package:flutter/foundation.dart'; +import 'package:neon/src/blocs/apps.dart'; +import 'package:neon/src/blocs/capabilities.dart'; +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/utils/account_options.dart'; +import 'package:neon/src/utils/app_implementation.dart'; +import 'package:neon/src/utils/bloc.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'; const _keyAccounts = 'accounts'; diff --git a/packages/neon/neon/lib/src/blocs/apps.dart b/packages/neon/neon/lib/src/blocs/apps.dart index 5267d3fb..9a9a350e 100644 --- a/packages/neon/neon/lib/src/blocs/apps.dart +++ b/packages/neon/neon/lib/src/blocs/apps.dart @@ -1,4 +1,18 @@ -part of 'blocs.dart'; +import 'dart:async'; + +import 'package:flutter/foundation.dart'; +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/utils/app_implementation.dart'; +import 'package:neon/src/utils/bloc.dart'; +import 'package:neon/src/utils/nextcloud_app_specific_options.dart'; +import 'package:neon/src/utils/request_manager.dart'; +import 'package:neon/src/utils/result.dart'; +import 'package:nextcloud/nextcloud.dart'; +import 'package:provider/provider.dart'; +import 'package:rxdart/rxdart.dart'; typedef NextcloudApp = CoreNavigationApps_Ocs_Data; diff --git a/packages/neon/neon/lib/src/blocs/blocs.dart b/packages/neon/neon/lib/src/blocs/blocs.dart deleted file mode 100644 index e411e525..00000000 --- a/packages/neon/neon/lib/src/blocs/blocs.dart +++ /dev/null @@ -1,23 +0,0 @@ -import 'dart:async'; -import 'dart:convert'; - -import 'package:flutter/foundation.dart'; -import 'package:neon/neon.dart'; -import 'package:nextcloud/nextcloud.dart'; -import 'package:package_info_plus/package_info_plus.dart'; -import 'package:provider/provider.dart'; -import 'package:rxdart/rxdart.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:unifiedpush/unifiedpush.dart'; -import 'package:window_manager/window_manager.dart'; - -part 'accounts.dart'; -part 'apps.dart'; -part 'capabilities.dart'; -part 'first_launch.dart'; -part 'login.dart'; -part 'next_push.dart'; -part 'push_notifications.dart'; -part 'user_details.dart'; -part 'timer.dart'; -part 'user_statuses.dart'; diff --git a/packages/neon/neon/lib/src/blocs/capabilities.dart b/packages/neon/neon/lib/src/blocs/capabilities.dart index e8df66c2..dbb44227 100644 --- a/packages/neon/neon/lib/src/blocs/capabilities.dart +++ b/packages/neon/neon/lib/src/blocs/capabilities.dart @@ -1,4 +1,11 @@ -part of 'blocs.dart'; +import 'dart:async'; + +import 'package:neon/src/models/account.dart'; +import 'package:neon/src/utils/bloc.dart'; +import 'package:neon/src/utils/request_manager.dart'; +import 'package:neon/src/utils/result.dart'; +import 'package:nextcloud/nextcloud.dart'; +import 'package:rxdart/rxdart.dart'; typedef Capabilities = CoreServerCapabilities_Ocs_Data; typedef NextcloudTheme = CoreServerCapabilities_Ocs_Data_Capabilities_Theming; diff --git a/packages/neon/neon/lib/src/blocs/first_launch.dart b/packages/neon/neon/lib/src/blocs/first_launch.dart index 6716d461..1feb3436 100644 --- a/packages/neon/neon/lib/src/blocs/first_launch.dart +++ b/packages/neon/neon/lib/src/blocs/first_launch.dart @@ -1,4 +1,8 @@ -part of 'blocs.dart'; +import 'dart:async'; + +import 'package:neon/src/utils/bloc.dart'; +import 'package:rxdart/rxdart.dart'; +import 'package:shared_preferences/shared_preferences.dart'; abstract class FirstLaunchBlocEvents {} diff --git a/packages/neon/neon/lib/src/blocs/login.dart b/packages/neon/neon/lib/src/blocs/login.dart index 14d3695a..f3df6f20 100644 --- a/packages/neon/neon/lib/src/blocs/login.dart +++ b/packages/neon/neon/lib/src/blocs/login.dart @@ -1,4 +1,11 @@ -part of 'blocs.dart'; +import 'dart:async'; + +import 'package:flutter/foundation.dart'; +import 'package:neon/src/models/account.dart'; +import 'package:neon/src/utils/bloc.dart'; +import 'package:nextcloud/nextcloud.dart'; +import 'package:package_info_plus/package_info_plus.dart'; +import 'package:rxdart/rxdart.dart'; abstract class LoginBlocEvents { void setServerURL(final String? url); diff --git a/packages/neon/neon/lib/src/blocs/next_push.dart b/packages/neon/neon/lib/src/blocs/next_push.dart index 3e645d03..d9b6ea0f 100644 --- a/packages/neon/neon/lib/src/blocs/next_push.dart +++ b/packages/neon/neon/lib/src/blocs/next_push.dart @@ -1,4 +1,11 @@ -part of 'blocs.dart'; +import 'dart:async'; + +import 'package:flutter/foundation.dart'; +import 'package:neon/src/blocs/accounts.dart'; +import 'package:neon/src/models/account.dart'; +import 'package:neon/src/utils/bloc.dart'; +import 'package:neon/src/utils/global_options.dart'; +import 'package:rxdart/rxdart.dart'; abstract class NextPushBlocEvents {} diff --git a/packages/neon/neon/lib/src/blocs/push_notifications.dart b/packages/neon/neon/lib/src/blocs/push_notifications.dart index 8a2423b5..e2bac132 100644 --- a/packages/neon/neon/lib/src/blocs/push_notifications.dart +++ b/packages/neon/neon/lib/src/blocs/push_notifications.dart @@ -1,4 +1,18 @@ -part of 'blocs.dart'; +import 'dart:async'; +import 'dart:convert'; + +import 'package:flutter/foundation.dart'; +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/utils/bloc.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'; abstract class PushNotificationsBlocEvents {} diff --git a/packages/neon/neon/lib/src/blocs/timer.dart b/packages/neon/neon/lib/src/blocs/timer.dart index 3e0098f8..8b89a07a 100644 --- a/packages/neon/neon/lib/src/blocs/timer.dart +++ b/packages/neon/neon/lib/src/blocs/timer.dart @@ -1,4 +1,8 @@ -part of 'blocs.dart'; +import 'dart:async'; +import 'dart:ui'; + +import 'package:meta/meta.dart'; +import 'package:neon/src/utils/bloc.dart'; abstract class TimerBlocEvents { /// Register a [callback] that will be called periodically. diff --git a/packages/neon/neon/lib/src/blocs/user_details.dart b/packages/neon/neon/lib/src/blocs/user_details.dart index 4f8ab596..2f5d6ad1 100644 --- a/packages/neon/neon/lib/src/blocs/user_details.dart +++ b/packages/neon/neon/lib/src/blocs/user_details.dart @@ -1,4 +1,11 @@ -part of 'blocs.dart'; +import 'dart:async'; + +import 'package:neon/src/models/account.dart'; +import 'package:neon/src/utils/bloc.dart'; +import 'package:neon/src/utils/request_manager.dart'; +import 'package:neon/src/utils/result.dart'; +import 'package:nextcloud/nextcloud.dart'; +import 'package:rxdart/rxdart.dart'; abstract class UserDetailsBlocEvents {} diff --git a/packages/neon/neon/lib/src/blocs/user_statuses.dart b/packages/neon/neon/lib/src/blocs/user_statuses.dart index f81daa0a..b0d329ac 100644 --- a/packages/neon/neon/lib/src/blocs/user_statuses.dart +++ b/packages/neon/neon/lib/src/blocs/user_statuses.dart @@ -1,4 +1,14 @@ -part of 'blocs.dart'; +import 'dart:async'; + +import 'package:flutter/foundation.dart'; +import 'package:neon/src/blocs/timer.dart'; +import 'package:neon/src/models/account.dart'; +import 'package:neon/src/platform/platform.dart'; +import 'package:neon/src/utils/bloc.dart'; +import 'package:neon/src/utils/result.dart'; +import 'package:nextcloud/nextcloud.dart'; +import 'package:rxdart/rxdart.dart'; +import 'package:window_manager/window_manager.dart'; abstract class UserStatusesBlocEvents { void load(final String username, {final bool force = false}); diff --git a/packages/neon/neon/lib/src/interfaces/notifications.dart b/packages/neon/neon/lib/src/interfaces/notifications.dart index a23c30fa..3b49eb08 100644 --- a/packages/neon/neon/lib/src/interfaces/notifications.dart +++ b/packages/neon/neon/lib/src/interfaces/notifications.dart @@ -1,4 +1,6 @@ -part of '../../neon.dart'; +import 'package:neon/src/utils/app_implementation.dart'; +import 'package:neon/src/utils/bloc.dart'; +import 'package:neon/src/utils/nextcloud_app_specific_options.dart'; abstract interface class NotificationsAppInterface extends AppImplementation { diff --git a/packages/neon/neon/lib/src/pages/account_settings.dart b/packages/neon/neon/lib/src/pages/account_settings.dart index 8e9d349e..1982184e 100644 --- a/packages/neon/neon/lib/src/pages/account_settings.dart +++ b/packages/neon/neon/lib/src/pages/account_settings.dart @@ -1,4 +1,16 @@ -part of '../../neon.dart'; +import 'package:filesize/filesize.dart'; +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/blocs/accounts.dart'; +import 'package:neon/src/models/account.dart'; +import 'package:neon/src/router.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:neon/src/widgets/result_builder.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 0994b71b..f65552da 100644 --- a/packages/neon/neon/lib/src/pages/home.dart +++ b/packages/neon/neon/lib/src/pages/home.dart @@ -1,4 +1,21 @@ -part of '../../neon.dart'; +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:neon/l10n/localizations.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/utils/app_implementation.dart'; +import 'package:neon/src/utils/global_options.dart'; +import 'package:neon/src/utils/global_options.dart' as global_options; +import 'package:neon/src/utils/global_popups.dart'; +import 'package:neon/src/widgets/app_bar.dart'; +import 'package:neon/src/widgets/drawer.dart'; +import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/result_builder.dart'; +import 'package:neon/src/widgets/user_avatar.dart'; +import 'package:provider/provider.dart'; +import 'package:settings/settings.dart'; const kQuickBarWidth = kAvatarSize + 20; @@ -133,10 +150,10 @@ class _HomePageState extends State { }, ); - final body = OptionBuilder( + final body = OptionBuilder( option: _globalOptions.navigationMode, builder: (final context, final navigationMode) { - final drawerAlwaysVisible = navigationMode == NavigationMode.drawerAlwaysVisible; + final drawerAlwaysVisible = navigationMode == global_options.NavigationMode.drawerAlwaysVisible; final body = Scaffold( key: _scaffoldKey, diff --git a/packages/neon/neon/lib/src/pages/login.dart b/packages/neon/neon/lib/src/pages/login.dart index 8ca960b9..e0d01535 100644 --- a/packages/neon/neon/lib/src/pages/login.dart +++ b/packages/neon/neon/lib/src/pages/login.dart @@ -1,4 +1,19 @@ -part of '../../neon.dart'; +import 'package:flutter/material.dart'; +import 'package:neon/l10n/localizations.dart'; +import 'package:neon/src/blocs/accounts.dart'; +import 'package:neon/src/blocs/login.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/utils/branding.dart'; +import 'package:neon/src/utils/validators.dart'; +import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/linear_progress_indicator.dart'; +import 'package:neon/src/widgets/nextcloud_logo.dart'; +import 'package:package_info_plus/package_info_plus.dart'; +import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher_string.dart'; +import 'package:webview_flutter/webview_flutter.dart'; class LoginPage extends StatefulWidget { const LoginPage({ @@ -13,7 +28,7 @@ class LoginPage extends StatefulWidget { } class _LoginPageState extends State { - WebViewController? _webViewController; + late WebViewController? _webViewController; final _formKey = GlobalKey(); final _focusNode = FocusNode(); late final PackageInfo _packageInfo; 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 ac0ec696..2fbb760e 100644 --- a/packages/neon/neon/lib/src/pages/nextcloud_app_settings.dart +++ b/packages/neon/neon/lib/src/pages/nextcloud_app_settings.dart @@ -1,4 +1,9 @@ -part of '../../neon.dart'; +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/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 ac6ede2d..ee8bdb1e 100644 --- a/packages/neon/neon/lib/src/pages/settings.dart +++ b/packages/neon/neon/lib/src/pages/settings.dart @@ -1,4 +1,26 @@ -part of '../../neon.dart'; +import 'dart:convert'; +import 'dart:typed_data'; + +import 'package:file_picker/file_picker.dart'; +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/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/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({ diff --git a/packages/neon/neon/lib/src/platform/abstract.dart b/packages/neon/neon/lib/src/platform/abstract.dart deleted file mode 100644 index 7bdd2616..00000000 --- a/packages/neon/neon/lib/src/platform/abstract.dart +++ /dev/null @@ -1,36 +0,0 @@ -part of '../../neon.dart'; - -abstract class NeonPlatform { - NeonPlatform({ - required this.canUseWebView, - required this.canUseWakelock, - required this.canUseQuickActions, - required this.canUseSystemTray, - required this.canUseWindowManager, - required this.canUseCamera, - required this.canUsePushNotifications, - required this.getApplicationCachePath, - required this.getUserAccessibleAppDataPath, - this.init, - }); - - final bool canUseWebView; - - final bool canUseWakelock; - - final bool canUseQuickActions; - - final bool canUseSystemTray; - - final bool canUseWindowManager; - - final bool canUseCamera; - - final bool canUsePushNotifications; - - final Future Function() getApplicationCachePath; - - final Future Function() getUserAccessibleAppDataPath; - - final Future Function()? init; -} diff --git a/packages/neon/neon/lib/src/platform/android.dart b/packages/neon/neon/lib/src/platform/android.dart index 3b446a1c..5fadb329 100644 --- a/packages/neon/neon/lib/src/platform/android.dart +++ b/packages/neon/neon/lib/src/platform/android.dart @@ -1,4 +1,8 @@ -part of '../../neon.dart'; +import 'package:neon/src/platform/platform.dart'; +import 'package:neon/src/utils/exceptions.dart'; +import 'package:path/path.dart' as p; +import 'package:path_provider/path_provider.dart'; +import 'package:permission_handler/permission_handler.dart'; class AndroidNeonPlatform extends NeonPlatform { AndroidNeonPlatform() diff --git a/packages/neon/neon/lib/src/platform/linux.dart b/packages/neon/neon/lib/src/platform/linux.dart index 2876972d..e5b92506 100644 --- a/packages/neon/neon/lib/src/platform/linux.dart +++ b/packages/neon/neon/lib/src/platform/linux.dart @@ -1,4 +1,9 @@ -part of '../../neon.dart'; +import 'dart:io'; + +import 'package:neon/src/platform/platform.dart'; +import 'package:path/path.dart' as p; +import 'package:sqflite_common_ffi/sqflite_ffi.dart'; +import 'package:xdg_directories/xdg_directories.dart' as xdg; class LinuxNeonPlatform extends NeonPlatform { LinuxNeonPlatform() diff --git a/packages/neon/neon/lib/src/platform/platform.dart b/packages/neon/neon/lib/src/platform/platform.dart index 27846fbf..1466c866 100644 --- a/packages/neon/neon/lib/src/platform/platform.dart +++ b/packages/neon/neon/lib/src/platform/platform.dart @@ -1,4 +1,7 @@ -part of '../../neon.dart'; +import 'dart:io'; + +import 'package:neon/src/platform/android.dart'; +import 'package:neon/src/platform/linux.dart'; Future getNeonPlatform() async { NeonPlatform? platform; @@ -16,3 +19,38 @@ Future getNeonPlatform() async { await platform.init?.call(); return platform; } + +abstract class NeonPlatform { + NeonPlatform({ + required this.canUseWebView, + required this.canUseWakelock, + required this.canUseQuickActions, + required this.canUseSystemTray, + required this.canUseWindowManager, + required this.canUseCamera, + required this.canUsePushNotifications, + required this.getApplicationCachePath, + required this.getUserAccessibleAppDataPath, + this.init, + }); + + final bool canUseWebView; + + final bool canUseWakelock; + + final bool canUseQuickActions; + + final bool canUseSystemTray; + + final bool canUseWindowManager; + + final bool canUseCamera; + + final bool canUsePushNotifications; + + final Future Function() getApplicationCachePath; + + final Future Function() getUserAccessibleAppDataPath; + + final Future Function()? init; +} diff --git a/packages/neon/neon/lib/src/router.dart b/packages/neon/neon/lib/src/router.dart index b5adb25a..02fa7e70 100644 --- a/packages/neon/neon/lib/src/router.dart +++ b/packages/neon/neon/lib/src/router.dart @@ -1,7 +1,15 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/widgets.dart'; import 'package:go_router/go_router.dart'; -import 'package:neon/neon.dart'; +import 'package:neon/src/blocs/accounts.dart'; +import 'package:neon/src/models/account.dart'; +import 'package:neon/src/pages/account_settings.dart'; +import 'package:neon/src/pages/home.dart'; +import 'package:neon/src/pages/login.dart'; +import 'package:neon/src/pages/nextcloud_app_settings.dart'; +import 'package:neon/src/pages/settings.dart'; +import 'package:neon/src/utils/app_implementation.dart'; +import 'package:neon/src/utils/stream_listenable.dart'; import 'package:provider/provider.dart'; part 'router.g.dart'; diff --git a/packages/neon/neon/lib/src/utils/account_options.dart b/packages/neon/neon/lib/src/utils/account_options.dart index 708b2bfe..9476949e 100644 --- a/packages/neon/neon/lib/src/utils/account_options.dart +++ b/packages/neon/neon/lib/src/utils/account_options.dart @@ -1,4 +1,10 @@ -part of '../../neon.dart'; +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: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 8cc14e47..fcc2efbf 100644 --- a/packages/neon/neon/lib/src/utils/app_implementation.dart +++ b/packages/neon/neon/lib/src/utils/app_implementation.dart @@ -1,4 +1,19 @@ -part of '../../neon.dart'; +import 'package:collection/collection.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:neon/l10n/localizations.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/bloc.dart'; +import 'package:neon/src/utils/nextcloud_app_specific_options.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 { AppImplementation( diff --git a/packages/neon/neon/lib/src/utils/bloc.dart b/packages/neon/neon/lib/src/utils/bloc.dart index bf03d890..f4ba59b8 100644 --- a/packages/neon/neon/lib/src/utils/bloc.dart +++ b/packages/neon/neon/lib/src/utils/bloc.dart @@ -1,4 +1,7 @@ -part of '../../neon.dart'; +import 'dart:async'; + +import 'package:flutter/foundation.dart'; +import 'package:neon/src/utils/request_manager.dart'; abstract class Bloc { void dispose(); diff --git a/packages/neon/neon/lib/src/utils/branding.dart b/packages/neon/neon/lib/src/utils/branding.dart index c0e5607b..6116b675 100644 --- a/packages/neon/neon/lib/src/utils/branding.dart +++ b/packages/neon/neon/lib/src/utils/branding.dart @@ -1,4 +1,4 @@ -part of '../../neon.dart'; +import 'package:flutter/widgets.dart'; @immutable class Branding { diff --git a/packages/neon/neon/lib/src/utils/confirmation_dialog.dart b/packages/neon/neon/lib/src/utils/confirmation_dialog.dart index dfc97b6f..28e5e54a 100644 --- a/packages/neon/neon/lib/src/utils/confirmation_dialog.dart +++ b/packages/neon/neon/lib/src/utils/confirmation_dialog.dart @@ -1,4 +1,5 @@ -part of '../../neon.dart'; +import 'package:flutter/material.dart'; +import 'package:neon/l10n/localizations.dart'; Future showConfirmationDialog(final BuildContext context, final String title) async => await showDialog( diff --git a/packages/neon/neon/lib/src/utils/exceptions.dart b/packages/neon/neon/lib/src/utils/exceptions.dart index 0131906e..a92f1d77 100644 --- a/packages/neon/neon/lib/src/utils/exceptions.dart +++ b/packages/neon/neon/lib/src/utils/exceptions.dart @@ -1,4 +1,4 @@ -part of '../../neon.dart'; +import 'package:permission_handler/permission_handler.dart'; class MissingPermissionException implements Exception { MissingPermissionException(this.permission); diff --git a/packages/neon/neon/lib/src/utils/global.dart b/packages/neon/neon/lib/src/utils/global.dart index f3721552..aea4b4be 100644 --- a/packages/neon/neon/lib/src/utils/global.dart +++ b/packages/neon/neon/lib/src/utils/global.dart @@ -1,4 +1,4 @@ -part of '../../neon.dart'; +import 'package:neon/src/models/push_notification.dart'; class Global { static Function(String accountID)? onPushNotificationReceived; diff --git a/packages/neon/neon/lib/src/utils/global_options.dart b/packages/neon/neon/lib/src/utils/global_options.dart index 2a43bdfc..18c6aecd 100644 --- a/packages/neon/neon/lib/src/utils/global_options.dart +++ b/packages/neon/neon/lib/src/utils/global_options.dart @@ -1,4 +1,15 @@ -part of '../../neon.dart'; +import 'dart:async'; +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: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/global_popups.dart b/packages/neon/neon/lib/src/utils/global_popups.dart index aa79a40f..3b7608a7 100644 --- a/packages/neon/neon/lib/src/utils/global_popups.dart +++ b/packages/neon/neon/lib/src/utils/global_popups.dart @@ -1,4 +1,11 @@ -part of '../../neon.dart'; +import 'package:flutter/material.dart'; +import 'package:neon/l10n/localizations.dart'; +import 'package:neon/src/blocs/first_launch.dart'; +import 'package:neon/src/blocs/next_push.dart'; +import 'package:neon/src/router.dart'; +import 'package:neon/src/utils/global_options.dart'; +import 'package:provider/provider.dart'; +import 'package:url_launcher/url_launcher_string.dart'; class GlobalPopups { factory GlobalPopups() => instance ??= GlobalPopups._(); diff --git a/packages/neon/neon/lib/src/utils/hex_color.dart b/packages/neon/neon/lib/src/utils/hex_color.dart index 670e28ab..ca488c70 100644 --- a/packages/neon/neon/lib/src/utils/hex_color.dart +++ b/packages/neon/neon/lib/src/utils/hex_color.dart @@ -1,4 +1,4 @@ -part of '../../neon.dart'; +import 'dart:ui'; class HexColor extends Color { HexColor(final String hexColor) : super(_parse(hexColor)); diff --git a/packages/neon/neon/lib/src/utils/localizations.dart b/packages/neon/neon/lib/src/utils/localizations.dart index d3a3cdf8..df87e801 100644 --- a/packages/neon/neon/lib/src/utils/localizations.dart +++ b/packages/neon/neon/lib/src/utils/localizations.dart @@ -1,4 +1,7 @@ -part of '../../neon.dart'; +import 'dart:ui'; + +import 'package:intl/intl_standalone.dart'; +import 'package:neon/l10n/localizations.dart'; /// Loads the [AppLocalizations] for the system [Locale]. /// diff --git a/packages/neon/neon/lib/src/utils/nextcloud_app_specific_options.dart b/packages/neon/neon/lib/src/utils/nextcloud_app_specific_options.dart index b2adcad1..c7e8cdbc 100644 --- a/packages/neon/neon/lib/src/utils/nextcloud_app_specific_options.dart +++ b/packages/neon/neon/lib/src/utils/nextcloud_app_specific_options.dart @@ -1,4 +1,5 @@ -part of '../../neon.dart'; +import 'package:neon/src/utils/storage.dart'; +import 'package:settings/settings.dart'; abstract class NextcloudAppSpecificOptions { NextcloudAppSpecificOptions(this.storage); diff --git a/packages/neon/neon/lib/src/utils/push_utils.dart b/packages/neon/neon/lib/src/utils/push_utils.dart index 56db29e2..77347095 100644 --- a/packages/neon/neon/lib/src/utils/push_utils.dart +++ b/packages/neon/neon/lib/src/utils/push_utils.dart @@ -1,4 +1,24 @@ -part of '../../neon.dart'; +import 'dart:convert'; +import 'dart:ui'; + +import 'package:bitmap/bitmap.dart'; +import 'package:crypto/crypto.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_cache_manager/flutter_cache_manager.dart'; +import 'package:flutter_local_notifications/flutter_local_notifications.dart'; +import 'package:flutter_svg/flutter_svg.dart' show SvgFileLoader, vg; +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/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'; class PushUtils { static Future loadRSAKeypair(final AppStorage storage) async { diff --git a/packages/neon/neon/lib/src/utils/rename_dialog.dart b/packages/neon/neon/lib/src/utils/rename_dialog.dart index e03efb68..24ec4876 100644 --- a/packages/neon/neon/lib/src/utils/rename_dialog.dart +++ b/packages/neon/neon/lib/src/utils/rename_dialog.dart @@ -1,4 +1,6 @@ -part of '../../neon.dart'; +import 'package:flutter/material.dart'; +import 'package:neon/src/utils/validators.dart'; +import 'package:neon/src/widgets/dialog.dart'; Future showRenameDialog({ required final BuildContext context, diff --git a/packages/neon/neon/lib/src/utils/request_manager.dart b/packages/neon/neon/lib/src/utils/request_manager.dart index ccb984ac..a0ba17a8 100644 --- a/packages/neon/neon/lib/src/utils/request_manager.dart +++ b/packages/neon/neon/lib/src/utils/request_manager.dart @@ -1,4 +1,13 @@ -part of '../../neon.dart'; +import 'dart:convert'; + +import 'package:flutter/foundation.dart'; +import 'package:neon/src/platform/platform.dart'; +import 'package:neon/src/utils/result.dart'; +import 'package:nextcloud/nextcloud.dart'; +import 'package:path/path.dart' as p; +import 'package:rxdart/rxdart.dart'; +import 'package:sqflite/sqflite.dart'; +import 'package:xml/xml.dart' as xml; class RequestManager { RequestManager([ diff --git a/packages/neon/neon/lib/src/utils/result.dart b/packages/neon/neon/lib/src/utils/result.dart index 180b11ee..d652fbbf 100644 --- a/packages/neon/neon/lib/src/utils/result.dart +++ b/packages/neon/neon/lib/src/utils/result.dart @@ -1,4 +1,4 @@ -part of '../../neon.dart'; +import 'package:meta/meta.dart'; @immutable class Result { diff --git a/packages/neon/neon/lib/src/utils/save_file.dart b/packages/neon/neon/lib/src/utils/save_file.dart index 3c3cecb6..bee7df4a 100644 --- a/packages/neon/neon/lib/src/utils/save_file.dart +++ b/packages/neon/neon/lib/src/utils/save_file.dart @@ -1,4 +1,8 @@ -part of '../../neon.dart'; +import 'dart:io'; +import 'dart:typed_data'; + +import 'package:file_picker/file_picker.dart'; +import 'package:flutter_file_dialog/flutter_file_dialog.dart'; Future saveFileWithPickDialog(final String fileName, final Uint8List data) async { if (Platform.isAndroid || Platform.isIOS) { 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 7152dc9c..32fb7678 100644 --- a/packages/neon/neon/lib/src/utils/settings_export_helper.dart +++ b/packages/neon/neon/lib/src/utils/settings_export_helper.dart @@ -1,4 +1,7 @@ -part of '../../neon.dart'; +import 'package:neon/src/models/account.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 b9d96efc..19203579 100644 --- a/packages/neon/neon/lib/src/utils/sort_box_builder.dart +++ b/packages/neon/neon/lib/src/utils/sort_box_builder.dart @@ -1,4 +1,6 @@ -part of '../../neon.dart'; +import 'package:flutter/widgets.dart'; +import 'package:settings/settings.dart'; +import 'package:sort_box/sort_box.dart'; class SortBoxBuilder extends StatelessWidget { const SortBoxBuilder({ 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 ff56d948..6ef6c9d2 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,4 +1,6 @@ -part of '../../neon.dart'; +import 'package:neon/l10n/localizations.dart'; +import 'package:settings/settings.dart'; +import 'package:sort_box/sort_box.dart'; final sortBoxOrderOptionValues = { SortBoxOrder.ascending: (final context) => AppLocalizations.of(context).optionsSortOrderAscending, diff --git a/packages/neon/neon/lib/src/utils/storage.dart b/packages/neon/neon/lib/src/utils/storage.dart index 2cc6cdcf..95e1cf52 100644 --- a/packages/neon/neon/lib/src/utils/storage.dart +++ b/packages/neon/neon/lib/src/utils/storage.dart @@ -1,4 +1,5 @@ -part of '../../neon.dart'; +import 'package:settings/settings.dart'; +import 'package:shared_preferences/shared_preferences.dart'; class AppStorage implements SettingsStorage { AppStorage( diff --git a/packages/neon/neon/lib/src/utils/stream_listenable.dart b/packages/neon/neon/lib/src/utils/stream_listenable.dart index 9a93ea49..d1e5b65e 100644 --- a/packages/neon/neon/lib/src/utils/stream_listenable.dart +++ b/packages/neon/neon/lib/src/utils/stream_listenable.dart @@ -1,4 +1,7 @@ -part of '../../neon.dart'; +import 'dart:async'; + +import 'package:flutter/foundation.dart'; +import 'package:rxdart/rxdart.dart'; /// Listenable Stream /// diff --git a/packages/neon/neon/lib/src/utils/theme.dart b/packages/neon/neon/lib/src/utils/theme.dart index f82eaad8..45d90776 100644 --- a/packages/neon/neon/lib/src/utils/theme.dart +++ b/packages/neon/neon/lib/src/utils/theme.dart @@ -1,4 +1,6 @@ -part of '../../neon.dart'; +import 'package:flutter/material.dart'; +import 'package:neon/src/utils/hex_color.dart'; +import 'package:nextcloud/nextcloud.dart'; const themePrimaryColor = Color(0xFFF37736); diff --git a/packages/neon/neon/lib/src/utils/validators.dart b/packages/neon/neon/lib/src/utils/validators.dart index 6aeb7f05..757209d7 100644 --- a/packages/neon/neon/lib/src/utils/validators.dart +++ b/packages/neon/neon/lib/src/utils/validators.dart @@ -1,4 +1,5 @@ -part of '../../neon.dart'; +import 'package:flutter/widgets.dart'; +import 'package:neon/l10n/localizations.dart'; String? validateHttpUrl( final BuildContext context, diff --git a/packages/neon/neon/lib/src/widgets/account_settings_tile.dart b/packages/neon/neon/lib/src/widgets/account_settings_tile.dart index 74801495..a4c38517 100644 --- a/packages/neon/neon/lib/src/widgets/account_settings_tile.dart +++ b/packages/neon/neon/lib/src/widgets/account_settings_tile.dart @@ -1,4 +1,7 @@ -part of '../../neon.dart'; +import 'package:flutter/material.dart'; +import 'package:neon/src/models/account.dart'; +import 'package:neon/src/widgets/account_tile.dart'; +import 'package:settings/settings.dart'; class NeonAccountSettingsTile extends SettingsTile { const NeonAccountSettingsTile({ diff --git a/packages/neon/neon/lib/src/widgets/account_tile.dart b/packages/neon/neon/lib/src/widgets/account_tile.dart index 8809e431..392e3fb8 100644 --- a/packages/neon/neon/lib/src/widgets/account_tile.dart +++ b/packages/neon/neon/lib/src/widgets/account_tile.dart @@ -1,4 +1,12 @@ -part of '../../neon.dart'; +import 'package:flutter/material.dart'; +import 'package:neon/src/blocs/accounts.dart'; +import 'package:neon/src/models/account.dart'; +import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/linear_progress_indicator.dart'; +import 'package:neon/src/widgets/result_builder.dart'; +import 'package:neon/src/widgets/user_avatar.dart'; +import 'package:nextcloud/nextcloud.dart'; +import 'package:provider/provider.dart'; class NeonAccountTile extends StatelessWidget { const NeonAccountTile({ diff --git a/packages/neon/neon/lib/src/widgets/app_bar.dart b/packages/neon/neon/lib/src/widgets/app_bar.dart index eeb8bfe3..42666abc 100644 --- a/packages/neon/neon/lib/src/widgets/app_bar.dart +++ b/packages/neon/neon/lib/src/widgets/app_bar.dart @@ -3,8 +3,17 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:meta/meta.dart'; import 'package:neon/l10n/localizations.dart'; -import 'package:neon/neon.dart'; +import 'package:neon/src/blocs/accounts.dart'; +import 'package:neon/src/blocs/apps.dart'; +import 'package:neon/src/interfaces/notifications.dart'; +import 'package:neon/src/models/account.dart'; import 'package:neon/src/router.dart'; +import 'package:neon/src/utils/app_implementation.dart'; +import 'package:neon/src/widgets/app_implementation_icon.dart'; +import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/linear_progress_indicator.dart'; +import 'package:neon/src/widgets/result_builder.dart'; +import 'package:neon/src/widgets/user_avatar.dart'; import 'package:provider/provider.dart'; @internal diff --git a/packages/neon/neon/lib/src/widgets/app_implementation_icon.dart b/packages/neon/neon/lib/src/widgets/app_implementation_icon.dart index c76c637a..577e56f2 100644 --- a/packages/neon/neon/lib/src/widgets/app_implementation_icon.dart +++ b/packages/neon/neon/lib/src/widgets/app_implementation_icon.dart @@ -1,4 +1,6 @@ -part of '../../neon.dart'; +import 'package:flutter/widgets.dart'; +import 'package:neon/src/utils/app_implementation.dart'; +import 'package:neon/src/widgets/user_avatar.dart'; class NeonAppImplementationIcon extends StatelessWidget { const NeonAppImplementationIcon({ diff --git a/packages/neon/neon/lib/src/widgets/cached_image.dart b/packages/neon/neon/lib/src/widgets/cached_image.dart index 1a1ac7f6..0d6f6496 100644 --- a/packages/neon/neon/lib/src/widgets/cached_image.dart +++ b/packages/neon/neon/lib/src/widgets/cached_image.dart @@ -1,4 +1,12 @@ -part of '../../neon.dart'; +import 'dart:async'; +import 'dart:convert'; +import 'dart:typed_data'; + +import 'package:flutter/material.dart'; +import 'package:flutter_cache_manager/flutter_cache_manager.dart'; +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/linear_progress_indicator.dart'; typedef CacheReviver = FutureOr Function(CacheManager cacheManager); typedef ImageDownloader = FutureOr Function(); diff --git a/packages/neon/neon/lib/src/widgets/dialog.dart b/packages/neon/neon/lib/src/widgets/dialog.dart index 33cb59ae..88dba87d 100644 --- a/packages/neon/neon/lib/src/widgets/dialog.dart +++ b/packages/neon/neon/lib/src/widgets/dialog.dart @@ -1,4 +1,4 @@ -part of '../../neon.dart'; +import 'package:flutter/material.dart'; class NeonDialog extends StatelessWidget { const NeonDialog({ diff --git a/packages/neon/neon/lib/src/widgets/drawer.dart b/packages/neon/neon/lib/src/widgets/drawer.dart index 033e036a..0e5f0242 100644 --- a/packages/neon/neon/lib/src/widgets/drawer.dart +++ b/packages/neon/neon/lib/src/widgets/drawer.dart @@ -3,9 +3,18 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:meta/meta.dart'; import 'package:neon/l10n/localizations.dart'; -import 'package:neon/neon.dart'; +import 'package:neon/src/blocs/accounts.dart'; +import 'package:neon/src/blocs/apps.dart'; +import 'package:neon/src/blocs/capabilities.dart'; +import 'package:neon/src/models/account.dart'; import 'package:neon/src/router.dart'; +import 'package:neon/src/utils/app_implementation.dart'; +import 'package:neon/src/widgets/account_tile.dart'; +import 'package:neon/src/widgets/cached_image.dart'; import 'package:neon/src/widgets/drawer_destination.dart'; +import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/linear_progress_indicator.dart'; +import 'package:neon/src/widgets/result_builder.dart'; import 'package:provider/provider.dart'; @internal diff --git a/packages/neon/neon/lib/src/widgets/drawer_destination.dart b/packages/neon/neon/lib/src/widgets/drawer_destination.dart index fdeac234..70ea94ec 100644 --- a/packages/neon/neon/lib/src/widgets/drawer_destination.dart +++ b/packages/neon/neon/lib/src/widgets/drawer_destination.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:neon/neon.dart'; +import 'package:neon/src/widgets/user_avatar.dart'; import 'package:rxdart/subjects.dart'; typedef DestinationIconBuilder = Widget Function({Size size, Color color}); diff --git a/packages/neon/neon/lib/src/widgets/exception.dart b/packages/neon/neon/lib/src/widgets/exception.dart index b5ec41a3..e763e524 100644 --- a/packages/neon/neon/lib/src/widgets/exception.dart +++ b/packages/neon/neon/lib/src/widgets/exception.dart @@ -1,4 +1,14 @@ -part of '../../neon.dart'; +import 'dart:async'; +import 'dart:io'; + +import 'package:flutter/material.dart'; +import 'package:http/http.dart'; +import 'package:neon/l10n/localizations.dart'; +import 'package:neon/src/blocs/accounts.dart'; +import 'package:neon/src/router.dart'; +import 'package:neon/src/utils/exceptions.dart'; +import 'package:nextcloud/nextcloud.dart'; +import 'package:provider/provider.dart'; class NeonException extends StatelessWidget { const NeonException( diff --git a/packages/neon/neon/lib/src/widgets/image_wrapper.dart b/packages/neon/neon/lib/src/widgets/image_wrapper.dart index de44bc39..a080b809 100644 --- a/packages/neon/neon/lib/src/widgets/image_wrapper.dart +++ b/packages/neon/neon/lib/src/widgets/image_wrapper.dart @@ -1,4 +1,4 @@ -part of '../../neon.dart'; +import 'package:flutter/material.dart'; class NeonImageWrapper extends StatelessWidget { const NeonImageWrapper({ diff --git a/packages/neon/neon/lib/src/widgets/linear_progress_indicator.dart b/packages/neon/neon/lib/src/widgets/linear_progress_indicator.dart index 06075f42..cda19ca0 100644 --- a/packages/neon/neon/lib/src/widgets/linear_progress_indicator.dart +++ b/packages/neon/neon/lib/src/widgets/linear_progress_indicator.dart @@ -1,4 +1,4 @@ -part of '../../neon.dart'; +import 'package:flutter/material.dart'; class NeonLinearProgressIndicator extends StatelessWidget { const NeonLinearProgressIndicator({ diff --git a/packages/neon/neon/lib/src/widgets/list_view.dart b/packages/neon/neon/lib/src/widgets/list_view.dart index 8e4a3633..65adec54 100644 --- a/packages/neon/neon/lib/src/widgets/list_view.dart +++ b/packages/neon/neon/lib/src/widgets/list_view.dart @@ -1,4 +1,6 @@ -part of '../../neon.dart'; +import 'package:flutter/material.dart'; +import 'package:neon/src/widgets/exception.dart'; +import 'package:neon/src/widgets/linear_progress_indicator.dart'; class NeonListView extends StatelessWidget { const NeonListView({ diff --git a/packages/neon/neon/lib/src/widgets/nextcloud_logo.dart b/packages/neon/neon/lib/src/widgets/nextcloud_logo.dart index d813a8c6..6e8c6538 100644 --- a/packages/neon/neon/lib/src/widgets/nextcloud_logo.dart +++ b/packages/neon/neon/lib/src/widgets/nextcloud_logo.dart @@ -1,4 +1,5 @@ -part of '../../neon.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_svg/flutter_svg.dart'; class NextcloudLogo extends StatelessWidget { const NextcloudLogo({ diff --git a/packages/neon/neon/lib/src/widgets/relative_time.dart b/packages/neon/neon/lib/src/widgets/relative_time.dart index dfb51bf6..63837739 100644 --- a/packages/neon/neon/lib/src/widgets/relative_time.dart +++ b/packages/neon/neon/lib/src/widgets/relative_time.dart @@ -1,4 +1,4 @@ -part of '../../neon.dart'; +import 'package:flutter/widgets.dart'; class RelativeTime extends StatelessWidget { const RelativeTime({ diff --git a/packages/neon/neon/lib/src/widgets/result_builder.dart b/packages/neon/neon/lib/src/widgets/result_builder.dart index ae6954a3..7d6dd23f 100644 --- a/packages/neon/neon/lib/src/widgets/result_builder.dart +++ b/packages/neon/neon/lib/src/widgets/result_builder.dart @@ -1,4 +1,6 @@ -part of '../../neon.dart'; +import 'package:flutter/widgets.dart'; +import 'package:neon/src/utils/result.dart'; +import 'package:rxdart/rxdart.dart'; typedef ResultWidgetBuilder = Widget Function(BuildContext context, Result snapshot); diff --git a/packages/neon/neon/lib/src/widgets/text_settings_tile.dart b/packages/neon/neon/lib/src/widgets/text_settings_tile.dart index 1ee8da23..99e5bef6 100644 --- a/packages/neon/neon/lib/src/widgets/text_settings_tile.dart +++ b/packages/neon/neon/lib/src/widgets/text_settings_tile.dart @@ -1,4 +1,5 @@ -part of '../../neon.dart'; +import 'package:flutter/material.dart'; +import 'package:settings/settings.dart'; class NeonTextSettingsTile extends SettingsTile { const NeonTextSettingsTile({ diff --git a/packages/neon/neon/lib/src/widgets/user_avatar.dart b/packages/neon/neon/lib/src/widgets/user_avatar.dart index 06c677f3..ecf89c36 100644 --- a/packages/neon/neon/lib/src/widgets/user_avatar.dart +++ b/packages/neon/neon/lib/src/widgets/user_avatar.dart @@ -1,7 +1,17 @@ // ignore_for_file: use_late_for_private_fields_and_variables // ^ This is a really strange false positive, it goes of at a very random place without any meaning. Hopefully fixed soon? -part of '../../neon.dart'; +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:neon/src/blocs/accounts.dart'; +import 'package:neon/src/models/account.dart'; +import 'package:neon/src/utils/result.dart'; +import 'package:neon/src/widgets/cached_image.dart'; +import 'package:neon/src/widgets/result_builder.dart'; +import 'package:nextcloud/nextcloud.dart'; +import 'package:provider/provider.dart'; +import 'package:rxdart/rxdart.dart'; const kAvatarSize = 40.0; diff --git a/packages/neon/neon/lib/utils.dart b/packages/neon/neon/lib/utils.dart new file mode 100644 index 00000000..f8dc0a75 --- /dev/null +++ b/packages/neon/neon/lib/utils.dart @@ -0,0 +1,14 @@ +export 'package:neon/src/utils/app_implementation.dart'; +export 'package:neon/src/utils/bloc.dart'; +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/result.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/lib/widgets.dart b/packages/neon/neon/lib/widgets.dart new file mode 100644 index 00000000..60156447 --- /dev/null +++ b/packages/neon/neon/lib/widgets.dart @@ -0,0 +1,8 @@ +export 'package:neon/src/widgets/cached_image.dart'; +export 'package:neon/src/widgets/dialog.dart'; +export 'package:neon/src/widgets/exception.dart'; +export 'package:neon/src/widgets/image_wrapper.dart'; +export 'package:neon/src/widgets/linear_progress_indicator.dart'; +export 'package:neon/src/widgets/list_view.dart'; +export 'package:neon/src/widgets/relative_time.dart'; +export 'package:neon/src/widgets/result_builder.dart'; diff --git a/packages/neon/neon/test/hex_color_test.dart b/packages/neon/neon/test/hex_color_test.dart index c4166ebe..d0cdb657 100644 --- a/packages/neon/neon/test/hex_color_test.dart +++ b/packages/neon/neon/test/hex_color_test.dart @@ -1,5 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:neon/neon.dart'; +import 'package:neon/utils.dart'; import 'package:test/test.dart'; void main() { diff --git a/packages/neon/neon/test/result_test.dart b/packages/neon/neon/test/result_test.dart index e3a9d9de..e9df1143 100644 --- a/packages/neon/neon/test/result_test.dart +++ b/packages/neon/neon/test/result_test.dart @@ -1,4 +1,4 @@ -import 'package:neon/neon.dart'; +import 'package:neon/utils.dart'; import 'package:test/test.dart'; void main() { diff --git a/packages/neon/neon/test/timer_bloc_test.dart b/packages/neon/neon/test/timer_bloc_test.dart index 504e23df..2fcf71d4 100644 --- a/packages/neon/neon/test/timer_bloc_test.dart +++ b/packages/neon/neon/test/timer_bloc_test.dart @@ -1,4 +1,4 @@ -import 'package:neon/neon.dart'; +import 'package:neon/blocs.dart'; import 'package:test/test.dart'; void main() { diff --git a/packages/neon/neon_files/lib/neon_files.dart b/packages/neon/neon_files/lib/neon_files.dart index 078b3504..bfdb9a84 100644 --- a/packages/neon/neon_files/lib/neon_files.dart +++ b/packages/neon/neon_files/lib/neon_files.dart @@ -12,7 +12,11 @@ import 'package:flutter/material.dart'; import 'package:image_picker/image_picker.dart'; import 'package:intersperse/intersperse.dart'; import 'package:material_design_icons_flutter/material_design_icons_flutter.dart'; -import 'package:neon/neon.dart'; +import 'package:neon/blocs.dart'; +import 'package:neon/models.dart'; +import 'package:neon/platform.dart'; +import 'package:neon/utils.dart'; +import 'package:neon/widgets.dart'; import 'package:neon_files/l10n/localizations.dart'; import 'package:nextcloud/nextcloud.dart'; import 'package:open_file/open_file.dart'; diff --git a/packages/neon/neon_news/lib/neon_news.dart b/packages/neon/neon_news/lib/neon_news.dart index 31fe7a7b..e4ea8a18 100644 --- a/packages/neon/neon_news/lib/neon_news.dart +++ b/packages/neon/neon_news/lib/neon_news.dart @@ -8,7 +8,11 @@ import 'package:flutter_html/flutter_html.dart'; import 'package:html/dom.dart' as html_dom; import 'package:html/parser.dart' as html_parser; import 'package:material_design_icons_flutter/material_design_icons_flutter.dart'; -import 'package:neon/neon.dart'; +import 'package:neon/blocs.dart'; +import 'package:neon/models.dart'; +import 'package:neon/platform.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'; diff --git a/packages/neon/neon_notes/lib/neon_notes.dart b/packages/neon/neon_notes/lib/neon_notes.dart index 65543b61..eb09072e 100644 --- a/packages/neon/neon_notes/lib/neon_notes.dart +++ b/packages/neon/neon_notes/lib/neon_notes.dart @@ -8,7 +8,11 @@ import 'package:crypto/crypto.dart'; import 'package:flutter/material.dart'; import 'package:flutter_markdown/flutter_markdown.dart'; import 'package:material_design_icons_flutter/material_design_icons_flutter.dart'; -import 'package:neon/neon.dart'; +import 'package:neon/blocs.dart'; +import 'package:neon/models.dart'; +import 'package:neon/platform.dart'; +import 'package:neon/utils.dart'; +import 'package:neon/widgets.dart'; import 'package:neon_notes/l10n/localizations.dart'; import 'package:nextcloud/nextcloud.dart'; import 'package:provider/provider.dart'; diff --git a/packages/neon/neon_notifications/lib/neon_notifications.dart b/packages/neon/neon_notifications/lib/neon_notifications.dart index d7fc163c..326ddcc9 100644 --- a/packages/neon/neon_notifications/lib/neon_notifications.dart +++ b/packages/neon/neon_notifications/lib/neon_notifications.dart @@ -4,7 +4,11 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:material_design_icons_flutter/material_design_icons_flutter.dart'; -import 'package:neon/neon.dart'; +import 'package:neon/blocs.dart'; +import 'package:neon/interfaces.dart'; +import 'package:neon/models.dart'; +import 'package:neon/utils.dart'; +import 'package:neon/widgets.dart'; import 'package:neon_notifications/l10n/localizations.dart'; import 'package:nextcloud/nextcloud.dart'; import 'package:provider/provider.dart';