Browse Source

neon: make blocs a separate library

pull/341/head
Nikolas Rimikis 2 years ago
parent
commit
1e244ab9be
No known key found for this signature in database
GPG Key ID: 85ED1DE9786A4FF2
  1. 13
      packages/neon/neon/lib/neon.dart
  2. 2
      packages/neon/neon/lib/src/blocs/accounts.dart
  3. 2
      packages/neon/neon/lib/src/blocs/apps.dart
  4. 23
      packages/neon/neon/lib/src/blocs/blocs.dart
  5. 2
      packages/neon/neon/lib/src/blocs/capabilities.dart
  6. 2
      packages/neon/neon/lib/src/blocs/first_launch.dart
  7. 2
      packages/neon/neon/lib/src/blocs/login.dart
  8. 2
      packages/neon/neon/lib/src/blocs/next_push.dart
  9. 2
      packages/neon/neon/lib/src/blocs/push_notifications.dart
  10. 2
      packages/neon/neon/lib/src/blocs/timer.dart
  11. 2
      packages/neon/neon/lib/src/blocs/user_details.dart
  12. 2
      packages/neon/neon/lib/src/blocs/user_statuses.dart

13
packages/neon/neon/lib/neon.dart

@ -21,6 +21,7 @@ import 'package:http/http.dart';
import 'package:intl/intl_standalone.dart'; import 'package:intl/intl_standalone.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart'; import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
import 'package:neon/l10n/localizations.dart'; import 'package:neon/l10n/localizations.dart';
import 'package:neon/src/blocs/blocs.dart';
import 'package:neon/src/models/account.dart'; import 'package:neon/src/models/account.dart';
import 'package:neon/src/models/push_notification.dart'; import 'package:neon/src/models/push_notification.dart';
import 'package:neon/src/router.dart'; import 'package:neon/src/router.dart';
@ -38,27 +39,17 @@ import 'package:sort_box/sort_box.dart';
import 'package:sqflite/sqflite.dart'; import 'package:sqflite/sqflite.dart';
import 'package:sqflite_common_ffi/sqflite_ffi.dart'; import 'package:sqflite_common_ffi/sqflite_ffi.dart';
import 'package:tray_manager/tray_manager.dart' as tray; import 'package:tray_manager/tray_manager.dart' as tray;
import 'package:unifiedpush/unifiedpush.dart';
import 'package:url_launcher/url_launcher_string.dart'; import 'package:url_launcher/url_launcher_string.dart';
import 'package:webview_flutter/webview_flutter.dart'; import 'package:webview_flutter/webview_flutter.dart';
import 'package:window_manager/window_manager.dart'; import 'package:window_manager/window_manager.dart';
import 'package:xdg_directories/xdg_directories.dart' as xdg; import 'package:xdg_directories/xdg_directories.dart' as xdg;
import 'package:xml/xml.dart' as xml; import 'package:xml/xml.dart' as xml;
export 'src/blocs/blocs.dart';
export 'src/models/account.dart'; export 'src/models/account.dart';
export 'src/models/push_notification.dart'; export 'src/models/push_notification.dart';
part 'src/app.dart'; part 'src/app.dart';
part 'src/blocs/accounts.dart';
part 'src/blocs/apps.dart';
part 'src/blocs/capabilities.dart';
part 'src/blocs/first_launch.dart';
part 'src/blocs/login.dart';
part 'src/blocs/next_push.dart';
part 'src/blocs/push_notifications.dart';
part 'src/blocs/timer.dart';
part 'src/blocs/user_details.dart';
part 'src/blocs/user_statuses.dart';
part 'src/interfaces/notifications.dart'; part 'src/interfaces/notifications.dart';
part 'src/pages/account_settings.dart'; part 'src/pages/account_settings.dart';
part 'src/pages/home.dart'; part 'src/pages/home.dart';

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

@ -1,4 +1,4 @@
part of '../../neon.dart'; part of 'blocs.dart';
const _keyAccounts = 'accounts'; const _keyAccounts = 'accounts';

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

@ -1,4 +1,4 @@
part of '../../neon.dart'; part of 'blocs.dart';
typedef NextcloudApp = NextcloudCoreNavigationApps_Ocs_Data; typedef NextcloudApp = NextcloudCoreNavigationApps_Ocs_Data;

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

@ -0,0 +1,23 @@
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';

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

@ -1,4 +1,4 @@
part of '../../neon.dart'; part of 'blocs.dart';
typedef Capabilities = NextcloudCoreServerCapabilities_Ocs_Data; typedef Capabilities = NextcloudCoreServerCapabilities_Ocs_Data;
typedef NextcloudTheme = NextcloudCoreServerCapabilities_Ocs_Data_Capabilities_Theming; typedef NextcloudTheme = NextcloudCoreServerCapabilities_Ocs_Data_Capabilities_Theming;

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

@ -1,4 +1,4 @@
part of '../../neon.dart'; part of 'blocs.dart';
abstract class FirstLaunchBlocEvents {} abstract class FirstLaunchBlocEvents {}

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

@ -1,4 +1,4 @@
part of '../../neon.dart'; part of 'blocs.dart';
abstract class LoginBlocEvents { abstract class LoginBlocEvents {
void setServerURL(final String? url); void setServerURL(final String? url);

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

@ -1,4 +1,4 @@
part of '../../neon.dart'; part of 'blocs.dart';
abstract class NextPushBlocEvents {} abstract class NextPushBlocEvents {}

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

@ -1,4 +1,4 @@
part of '../../neon.dart'; part of 'blocs.dart';
abstract class PushNotificationsBlocEvents {} abstract class PushNotificationsBlocEvents {}

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

@ -1,4 +1,4 @@
part of '../../neon.dart'; part of 'blocs.dart';
abstract class TimerBlocEvents { abstract class TimerBlocEvents {
/// Register a [callback] that will be called periodically. /// Register a [callback] that will be called periodically.

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

@ -1,4 +1,4 @@
part of '../../neon.dart'; part of 'blocs.dart';
abstract class UserDetailsBlocEvents {} abstract class UserDetailsBlocEvents {}

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

@ -1,4 +1,4 @@
part of '../../neon.dart'; part of 'blocs.dart';
abstract class UserStatusesBlocEvents { abstract class UserStatusesBlocEvents {
void load(final String username, {final bool force = false}); void load(final String username, {final bool force = false});

Loading…
Cancel
Save