Browse Source

neon: Move bloc and result to it's own library

pull/436/head
jld3103 2 years ago
parent
commit
2e5a04ac75
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      packages/neon/neon/lib/src/app.dart
  2. 0
      packages/neon/neon/lib/src/bloc/bloc.dart
  3. 0
      packages/neon/neon/lib/src/bloc/result.dart
  4. 2
      packages/neon/neon/lib/src/bloc/result_builder.dart
  5. 2
      packages/neon/neon/lib/src/blocs/accounts.dart
  6. 4
      packages/neon/neon/lib/src/blocs/apps.dart
  7. 4
      packages/neon/neon/lib/src/blocs/capabilities.dart
  8. 2
      packages/neon/neon/lib/src/blocs/first_launch.dart
  9. 2
      packages/neon/neon/lib/src/blocs/login.dart
  10. 2
      packages/neon/neon/lib/src/blocs/next_push.dart
  11. 2
      packages/neon/neon/lib/src/blocs/push_notifications.dart
  12. 2
      packages/neon/neon/lib/src/blocs/timer.dart
  13. 4
      packages/neon/neon/lib/src/blocs/user_details.dart
  14. 4
      packages/neon/neon/lib/src/blocs/user_statuses.dart
  15. 2
      packages/neon/neon/lib/src/interfaces/notifications.dart
  16. 2
      packages/neon/neon/lib/src/pages/account_settings.dart
  17. 2
      packages/neon/neon/lib/src/pages/home.dart
  18. 2
      packages/neon/neon/lib/src/utils/app_implementation.dart
  19. 2
      packages/neon/neon/lib/src/utils/request_manager.dart
  20. 2
      packages/neon/neon/lib/src/widgets/account_tile.dart
  21. 2
      packages/neon/neon/lib/src/widgets/app_bar.dart
  22. 2
      packages/neon/neon/lib/src/widgets/drawer.dart
  23. 4
      packages/neon/neon/lib/src/widgets/user_avatar.dart
  24. 2
      packages/neon/neon/lib/utils.dart
  25. 1
      packages/neon/neon/lib/widgets.dart
  26. 2
      packages/neon/neon/test/result_test.dart

2
packages/neon/neon/lib/src/app.dart

@ -5,6 +5,7 @@ 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/bloc/result_builder.dart';
import 'package:neon/src/blocs/accounts.dart';
import 'package:neon/src/blocs/capabilities.dart';
import 'package:neon/src/interfaces/notifications.dart';
@ -18,7 +19,6 @@ 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';

0
packages/neon/neon/lib/src/utils/bloc.dart → packages/neon/neon/lib/src/bloc/bloc.dart

0
packages/neon/neon/lib/src/utils/result.dart → packages/neon/neon/lib/src/bloc/result.dart

2
packages/neon/neon/lib/src/widgets/result_builder.dart → packages/neon/neon/lib/src/bloc/result_builder.dart

@ -1,5 +1,5 @@
import 'package:flutter/widgets.dart';
import 'package:neon/src/utils/result.dart';
import 'package:neon/src/bloc/result.dart';
import 'package:rxdart/rxdart.dart';
typedef ResultWidgetBuilder<T> = Widget Function(BuildContext context, Result<T> snapshot);

2
packages/neon/neon/lib/src/blocs/accounts.dart

@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:convert';
import 'package:flutter/foundation.dart';
import 'package:neon/src/bloc/bloc.dart';
import 'package:neon/src/blocs/apps.dart';
import 'package:neon/src/blocs/capabilities.dart';
import 'package:neon/src/blocs/user_details.dart';
@ -10,7 +11,6 @@ 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';

4
packages/neon/neon/lib/src/blocs/apps.dart

@ -1,15 +1,15 @@
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:neon/src/bloc/bloc.dart';
import 'package:neon/src/bloc/result.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';

4
packages/neon/neon/lib/src/blocs/capabilities.dart

@ -1,9 +1,9 @@
import 'dart:async';
import 'package:neon/src/bloc/bloc.dart';
import 'package:neon/src/bloc/result.dart';
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';

2
packages/neon/neon/lib/src/blocs/first_launch.dart

@ -1,6 +1,6 @@
import 'dart:async';
import 'package:neon/src/utils/bloc.dart';
import 'package:neon/src/bloc/bloc.dart';
import 'package:rxdart/rxdart.dart';
import 'package:shared_preferences/shared_preferences.dart';

2
packages/neon/neon/lib/src/blocs/login.dart

@ -1,8 +1,8 @@
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:neon/src/bloc/bloc.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';

2
packages/neon/neon/lib/src/blocs/next_push.dart

@ -1,9 +1,9 @@
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:neon/src/bloc/bloc.dart';
import 'package:neon/src/blocs/accounts.dart';
import 'package:neon/src/models/account.dart';
import 'package:neon/src/utils/bloc.dart';
import 'package:neon/src/utils/global_options.dart';
import 'package:rxdart/rxdart.dart';

2
packages/neon/neon/lib/src/blocs/push_notifications.dart

@ -2,11 +2,11 @@ import 'dart:async';
import 'dart:convert';
import 'package:flutter/foundation.dart';
import 'package:neon/src/bloc/bloc.dart';
import 'package:neon/src/blocs/accounts.dart';
import 'package:neon/src/models/account.dart';
import 'package:neon/src/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';

2
packages/neon/neon/lib/src/blocs/timer.dart

@ -2,7 +2,7 @@ import 'dart:async';
import 'dart:ui';
import 'package:meta/meta.dart';
import 'package:neon/src/utils/bloc.dart';
import 'package:neon/src/bloc/bloc.dart';
abstract class TimerBlocEvents {
/// Register a [callback] that will be called periodically.

4
packages/neon/neon/lib/src/blocs/user_details.dart

@ -1,9 +1,9 @@
import 'dart:async';
import 'package:neon/src/bloc/bloc.dart';
import 'package:neon/src/bloc/result.dart';
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';

4
packages/neon/neon/lib/src/blocs/user_statuses.dart

@ -1,11 +1,11 @@
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:neon/src/bloc/bloc.dart';
import 'package:neon/src/bloc/result.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';

2
packages/neon/neon/lib/src/interfaces/notifications.dart

@ -1,5 +1,5 @@
import 'package:neon/src/bloc/bloc.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,

2
packages/neon/neon/lib/src/pages/account_settings.dart

@ -2,13 +2,13 @@ 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/bloc/result_builder.dart';
import 'package:neon/src/blocs/accounts.dart';
import 'package:neon/src/models/account.dart';
import 'package:neon/src/router.dart';
import 'package:neon/src/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';

2
packages/neon/neon/lib/src/pages/home.dart

@ -2,6 +2,7 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:neon/l10n/localizations.dart';
import 'package:neon/src/bloc/result_builder.dart';
import 'package:neon/src/blocs/accounts.dart';
import 'package:neon/src/blocs/apps.dart';
import 'package:neon/src/models/account.dart';
@ -12,7 +13,6 @@ 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';

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

@ -2,10 +2,10 @@ 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/bloc/bloc.dart';
import 'package:neon/src/blocs/accounts.dart';
import 'package:neon/src/models/account.dart';
import 'package:neon/src/platform/platform.dart';
import 'package:neon/src/utils/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';

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

@ -1,8 +1,8 @@
import 'dart:convert';
import 'package:flutter/foundation.dart';
import 'package:neon/src/bloc/result.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';

2
packages/neon/neon/lib/src/widgets/account_tile.dart

@ -1,9 +1,9 @@
import 'package:flutter/material.dart';
import 'package:neon/src/bloc/result_builder.dart';
import 'package:neon/src/blocs/accounts.dart';
import 'package:neon/src/models/account.dart';
import 'package:neon/src/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';

2
packages/neon/neon/lib/src/widgets/app_bar.dart

@ -3,6 +3,7 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
import 'package:neon/l10n/localizations.dart';
import 'package:neon/src/bloc/result_builder.dart';
import 'package:neon/src/blocs/accounts.dart';
import 'package:neon/src/blocs/apps.dart';
import 'package:neon/src/interfaces/notifications.dart';
@ -12,7 +13,6 @@ 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';

2
packages/neon/neon/lib/src/widgets/drawer.dart

@ -3,6 +3,7 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
import 'package:neon/l10n/localizations.dart';
import 'package:neon/src/bloc/result_builder.dart';
import 'package:neon/src/blocs/accounts.dart';
import 'package:neon/src/blocs/apps.dart';
import 'package:neon/src/blocs/capabilities.dart';
@ -14,7 +15,6 @@ 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

4
packages/neon/neon/lib/src/widgets/user_avatar.dart

@ -4,11 +4,11 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:neon/src/bloc/result.dart';
import 'package:neon/src/bloc/result_builder.dart';
import 'package:neon/src/blocs/accounts.dart';
import 'package:neon/src/models/account.dart';
import 'package:neon/src/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';

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

@ -1,5 +1,4 @@
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';
@ -7,7 +6,6 @@ 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';

1
packages/neon/neon/lib/widgets.dart

@ -5,4 +5,3 @@ 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/result_test.dart

@ -1,4 +1,4 @@
import 'package:neon/utils.dart';
import 'package:neon/blocs.dart';
import 'package:test/test.dart';
void main() {

Loading…
Cancel
Save