Browse Source

neon: Split everything into separate libraries

pull/436/head
jld3103 2 years ago
parent
commit
32311c5d08
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 1
      packages/app/integration_test/screenshot_test.dart
  2. 3
      packages/app/lib/apps.dart
  3. 2
      packages/app/lib/branding.dart
  4. 5
      packages/neon/neon/lib/blocs.dart
  5. 1
      packages/neon/neon/lib/interfaces.dart
  6. 1
      packages/neon/neon/lib/models.dart
  7. 106
      packages/neon/neon/lib/neon.dart
  8. 1
      packages/neon/neon/lib/platform.dart
  9. 27
      packages/neon/neon/lib/src/app.dart
  10. 19
      packages/neon/neon/lib/src/blocs/accounts.dart
  11. 16
      packages/neon/neon/lib/src/blocs/apps.dart
  12. 23
      packages/neon/neon/lib/src/blocs/blocs.dart
  13. 9
      packages/neon/neon/lib/src/blocs/capabilities.dart
  14. 6
      packages/neon/neon/lib/src/blocs/first_launch.dart
  15. 9
      packages/neon/neon/lib/src/blocs/login.dart
  16. 9
      packages/neon/neon/lib/src/blocs/next_push.dart
  17. 16
      packages/neon/neon/lib/src/blocs/push_notifications.dart
  18. 6
      packages/neon/neon/lib/src/blocs/timer.dart
  19. 9
      packages/neon/neon/lib/src/blocs/user_details.dart
  20. 12
      packages/neon/neon/lib/src/blocs/user_statuses.dart
  21. 4
      packages/neon/neon/lib/src/interfaces/notifications.dart
  22. 14
      packages/neon/neon/lib/src/pages/account_settings.dart
  23. 23
      packages/neon/neon/lib/src/pages/home.dart
  24. 19
      packages/neon/neon/lib/src/pages/login.dart
  25. 7
      packages/neon/neon/lib/src/pages/nextcloud_app_settings.dart
  26. 24
      packages/neon/neon/lib/src/pages/settings.dart
  27. 36
      packages/neon/neon/lib/src/platform/abstract.dart
  28. 6
      packages/neon/neon/lib/src/platform/android.dart
  29. 7
      packages/neon/neon/lib/src/platform/linux.dart
  30. 40
      packages/neon/neon/lib/src/platform/platform.dart
  31. 10
      packages/neon/neon/lib/src/router.dart
  32. 8
      packages/neon/neon/lib/src/utils/account_options.dart
  33. 17
      packages/neon/neon/lib/src/utils/app_implementation.dart
  34. 5
      packages/neon/neon/lib/src/utils/bloc.dart
  35. 2
      packages/neon/neon/lib/src/utils/branding.dart
  36. 3
      packages/neon/neon/lib/src/utils/confirmation_dialog.dart
  37. 2
      packages/neon/neon/lib/src/utils/exceptions.dart
  38. 2
      packages/neon/neon/lib/src/utils/global.dart
  39. 13
      packages/neon/neon/lib/src/utils/global_options.dart
  40. 9
      packages/neon/neon/lib/src/utils/global_popups.dart
  41. 2
      packages/neon/neon/lib/src/utils/hex_color.dart
  42. 5
      packages/neon/neon/lib/src/utils/localizations.dart
  43. 3
      packages/neon/neon/lib/src/utils/nextcloud_app_specific_options.dart
  44. 22
      packages/neon/neon/lib/src/utils/push_utils.dart
  45. 4
      packages/neon/neon/lib/src/utils/rename_dialog.dart
  46. 11
      packages/neon/neon/lib/src/utils/request_manager.dart
  47. 2
      packages/neon/neon/lib/src/utils/result.dart
  48. 6
      packages/neon/neon/lib/src/utils/save_file.dart
  49. 5
      packages/neon/neon/lib/src/utils/settings_export_helper.dart
  50. 4
      packages/neon/neon/lib/src/utils/sort_box_builder.dart
  51. 4
      packages/neon/neon/lib/src/utils/sort_box_order_option_values.dart
  52. 3
      packages/neon/neon/lib/src/utils/storage.dart
  53. 5
      packages/neon/neon/lib/src/utils/stream_listenable.dart
  54. 4
      packages/neon/neon/lib/src/utils/theme.dart
  55. 3
      packages/neon/neon/lib/src/utils/validators.dart
  56. 5
      packages/neon/neon/lib/src/widgets/account_settings_tile.dart
  57. 10
      packages/neon/neon/lib/src/widgets/account_tile.dart
  58. 11
      packages/neon/neon/lib/src/widgets/app_bar.dart
  59. 4
      packages/neon/neon/lib/src/widgets/app_implementation_icon.dart
  60. 10
      packages/neon/neon/lib/src/widgets/cached_image.dart
  61. 2
      packages/neon/neon/lib/src/widgets/dialog.dart
  62. 11
      packages/neon/neon/lib/src/widgets/drawer.dart
  63. 2
      packages/neon/neon/lib/src/widgets/drawer_destination.dart
  64. 12
      packages/neon/neon/lib/src/widgets/exception.dart
  65. 2
      packages/neon/neon/lib/src/widgets/image_wrapper.dart
  66. 2
      packages/neon/neon/lib/src/widgets/linear_progress_indicator.dart
  67. 4
      packages/neon/neon/lib/src/widgets/list_view.dart
  68. 3
      packages/neon/neon/lib/src/widgets/nextcloud_logo.dart
  69. 2
      packages/neon/neon/lib/src/widgets/relative_time.dart
  70. 4
      packages/neon/neon/lib/src/widgets/result_builder.dart
  71. 3
      packages/neon/neon/lib/src/widgets/text_settings_tile.dart
  72. 12
      packages/neon/neon/lib/src/widgets/user_avatar.dart
  73. 14
      packages/neon/neon/lib/utils.dart
  74. 8
      packages/neon/neon/lib/widgets.dart
  75. 2
      packages/neon/neon/test/hex_color_test.dart
  76. 2
      packages/neon/neon/test/result_test.dart
  77. 2
      packages/neon/neon/test/timer_bloc_test.dart
  78. 6
      packages/neon/neon_files/lib/neon_files.dart
  79. 6
      packages/neon/neon_news/lib/neon_news.dart
  80. 6
      packages/neon/neon_notes/lib/neon_notes.dart
  81. 6
      packages/neon/neon_notifications/lib/neon_notifications.dart

1
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';

3
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';

2
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',

5
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';

1
packages/neon/neon/lib/interfaces.dart

@ -0,0 +1 @@
export 'package:neon/src/interfaces/notifications.dart';

1
packages/neon/neon/lib/models.dart

@ -0,0 +1 @@
export 'package:neon/src/models/account.dart';

106
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<AppImplementation> Function(SharedPreferences, RequestManager, NeonPlatform)

1
packages/neon/neon/lib/platform.dart

@ -0,0 +1 @@
export 'package:neon/src/platform/platform.dart';

27
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({

19
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';

16
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;

23
packages/neon/neon/lib/src/blocs/blocs.dart

@ -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';

9
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;

6
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 {}

9
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);

9
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 {}

16
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 {}

6
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.

9
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 {}

12
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});

4
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<T extends NotificationsBlocInterface,
R extends NotificationsOptionsInterface> extends AppImplementation<T, R> {

14
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({

23
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<HomePage> {
},
);
final body = OptionBuilder<NavigationMode>(
final body = OptionBuilder<global_options.NavigationMode>(
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,

19
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<LoginPage> {
WebViewController? _webViewController;
late WebViewController? _webViewController;
final _formKey = GlobalKey<FormState>();
final _focusNode = FocusNode();
late final PackageInfo _packageInfo;

7
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({

24
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({

36
packages/neon/neon/lib/src/platform/abstract.dart

@ -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<String> Function() getApplicationCachePath;
final Future<String> Function() getUserAccessibleAppDataPath;
final Future Function()? init;
}

6
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()

7
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()

40
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<NeonPlatform> getNeonPlatform() async {
NeonPlatform? platform;
@ -16,3 +19,38 @@ Future<NeonPlatform> 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<String> Function() getApplicationCachePath;
final Future<String> Function() getUserAccessibleAppDataPath;
final Future Function()? init;
}

10
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';

8
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(

17
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<T extends Bloc, R extends NextcloudAppSpecificOptions> {
AppImplementation(

5
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();

2
packages/neon/neon/lib/src/utils/branding.dart

@ -1,4 +1,4 @@
part of '../../neon.dart';
import 'package:flutter/widgets.dart';
@immutable
class Branding {

3
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<bool> showConfirmationDialog(final BuildContext context, final String title) async =>
await showDialog<bool>(

2
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);

2
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;

13
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';

9
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._();

2
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));

5
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].
///

3
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);

22
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<RSAKeypair> loadRSAKeypair(final AppStorage storage) async {

4
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<String?> showRenameDialog({
required final BuildContext context,

11
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([

2
packages/neon/neon/lib/src/utils/result.dart

@ -1,4 +1,4 @@
part of '../../neon.dart';
import 'package:meta/meta.dart';
@immutable
class Result<T> {

6
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<String?> saveFileWithPickDialog(final String fileName, final Uint8List data) async {
if (Platform.isAndroid || Platform.isIOS) {

5
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({

4
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<T extends Enum, R> extends StatelessWidget {
const SortBoxBuilder({

4
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, LabelBuilder>{
SortBoxOrder.ascending: (final context) => AppLocalizations.of(context).optionsSortOrderAscending,

3
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(

5
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
///

4
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);

3
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,

5
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({

10
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({

11
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

4
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({

10
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<Uint8List?> Function(CacheManager cacheManager);
typedef ImageDownloader = FutureOr<Uint8List> Function();

2
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({

11
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

2
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});

12
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(

2
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({

2
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({

4
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<T> extends StatelessWidget {
const NeonListView({

3
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({

2
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({

4
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<T> = Widget Function(BuildContext context, Result<T> snapshot);

3
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({

12
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;

14
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';

8
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';

2
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() {

2
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() {

2
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() {

6
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';

6
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';

6
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';

6
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';

Loading…
Cancel
Save