Browse Source

neon: Mark things we never want to export as internal

pull/436/head
jld3103 1 year ago
parent
commit
8a7470cdaa
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      packages/neon/neon/lib/src/blocs/apps.dart
  2. 2
      packages/neon/neon/lib/src/blocs/capabilities.dart
  3. 2
      packages/neon/neon/lib/src/blocs/first_launch.dart
  4. 2
      packages/neon/neon/lib/src/blocs/login.dart
  5. 2
      packages/neon/neon/lib/src/blocs/next_push.dart
  6. 2
      packages/neon/neon/lib/src/blocs/push_notifications.dart
  7. 2
      packages/neon/neon/lib/src/blocs/user_details.dart
  8. 2
      packages/neon/neon/lib/src/blocs/user_statuses.dart
  9. 3
      packages/neon/neon/lib/src/models/push_notification.dart
  10. 2
      packages/neon/neon/lib/src/platform/android.dart
  11. 2
      packages/neon/neon/lib/src/platform/linux.dart
  12. 2
      packages/neon/neon/lib/src/settings/models/option.dart
  13. 2
      packages/neon/neon/lib/src/settings/widgets/account_settings_tile.dart
  14. 2
      packages/neon/neon/lib/src/settings/widgets/checkbox_settings_tile.dart
  15. 2
      packages/neon/neon/lib/src/settings/widgets/custom_settings_tile.dart
  16. 2
      packages/neon/neon/lib/src/settings/widgets/dropdown_button_settings_tile.dart
  17. 2
      packages/neon/neon/lib/src/settings/widgets/label_builder.dart
  18. 2
      packages/neon/neon/lib/src/settings/widgets/settings_category.dart
  19. 2
      packages/neon/neon/lib/src/settings/widgets/settings_list.dart
  20. 3
      packages/neon/neon/lib/src/settings/widgets/settings_tile.dart
  21. 2
      packages/neon/neon/lib/src/settings/widgets/text_settings_tile.dart
  22. 2
      packages/neon/neon/lib/src/utils/account_options.dart
  23. 2
      packages/neon/neon/lib/src/utils/global.dart
  24. 2
      packages/neon/neon/lib/src/utils/global_options.dart
  25. 2
      packages/neon/neon/lib/src/utils/global_popups.dart
  26. 2
      packages/neon/neon/lib/src/utils/localizations.dart
  27. 2
      packages/neon/neon/lib/src/utils/push_utils.dart
  28. 2
      packages/neon/neon/lib/src/utils/settings_export_helper.dart
  29. 3
      packages/neon/neon/lib/src/utils/theme.dart
  30. 2
      packages/neon/neon/lib/src/widgets/account_tile.dart
  31. 2
      packages/neon/neon/lib/src/widgets/app_implementation_icon.dart
  32. 7
      packages/neon/neon/lib/src/widgets/drawer_destination.dart

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

@ -1,6 +1,7 @@
import 'dart:async'; import 'dart:async';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:meta/meta.dart';
import 'package:neon/src/bloc/bloc.dart'; import 'package:neon/src/bloc/bloc.dart';
import 'package:neon/src/bloc/result.dart'; import 'package:neon/src/bloc/result.dart';
import 'package:neon/src/blocs/accounts.dart'; import 'package:neon/src/blocs/accounts.dart';
@ -34,6 +35,7 @@ abstract class AppsBlocStates {
BehaviorSubject<Iterable<(String, Object?)>?> get appVersions; BehaviorSubject<Iterable<(String, Object?)>?> get appVersions;
} }
@internal
class AppsBloc extends InteractiveBloc implements AppsBlocEvents, AppsBlocStates { class AppsBloc extends InteractiveBloc implements AppsBlocEvents, AppsBlocStates {
AppsBloc( AppsBloc(
this._requestManager, this._requestManager,

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

@ -1,5 +1,6 @@
import 'dart:async'; import 'dart:async';
import 'package:meta/meta.dart';
import 'package:neon/src/bloc/bloc.dart'; import 'package:neon/src/bloc/bloc.dart';
import 'package:neon/src/bloc/result.dart'; import 'package:neon/src/bloc/result.dart';
import 'package:neon/src/models/account.dart'; import 'package:neon/src/models/account.dart';
@ -16,6 +17,7 @@ abstract class CapabilitiesBlocStates {
BehaviorSubject<Result<Capabilities>> get capabilities; BehaviorSubject<Result<Capabilities>> get capabilities;
} }
@internal
class CapabilitiesBloc extends InteractiveBloc implements CapabilitiesBlocEvents, CapabilitiesBlocStates { class CapabilitiesBloc extends InteractiveBloc implements CapabilitiesBlocEvents, CapabilitiesBlocStates {
CapabilitiesBloc( CapabilitiesBloc(
this._requestManager, this._requestManager,

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

@ -1,5 +1,6 @@
import 'dart:async'; import 'dart:async';
import 'package:meta/meta.dart';
import 'package:neon/src/bloc/bloc.dart'; import 'package:neon/src/bloc/bloc.dart';
import 'package:rxdart/rxdart.dart'; import 'package:rxdart/rxdart.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@ -10,6 +11,7 @@ abstract class FirstLaunchBlocStates {
BehaviorSubject get onFirstLaunch; BehaviorSubject get onFirstLaunch;
} }
@internal
class FirstLaunchBloc extends Bloc implements FirstLaunchBlocEvents, FirstLaunchBlocStates { class FirstLaunchBloc extends Bloc implements FirstLaunchBlocEvents, FirstLaunchBlocStates {
FirstLaunchBloc( FirstLaunchBloc(
this._sharedPreferences, { this._sharedPreferences, {

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

@ -1,6 +1,7 @@
import 'dart:async'; import 'dart:async';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:meta/meta.dart';
import 'package:neon/src/bloc/bloc.dart'; import 'package:neon/src/bloc/bloc.dart';
import 'package:neon/src/models/account.dart'; import 'package:neon/src/models/account.dart';
import 'package:nextcloud/nextcloud.dart'; import 'package:nextcloud/nextcloud.dart';
@ -21,6 +22,7 @@ abstract class LoginBlocStates {
BehaviorSubject<CoreLoginFlowResult?> get loginFlowResult; BehaviorSubject<CoreLoginFlowResult?> get loginFlowResult;
} }
@internal
class LoginBloc extends InteractiveBloc implements LoginBlocEvents, LoginBlocStates { class LoginBloc extends InteractiveBloc implements LoginBlocEvents, LoginBlocStates {
LoginBloc(this._packageInfo); LoginBloc(this._packageInfo);

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

@ -1,6 +1,7 @@
import 'dart:async'; import 'dart:async';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:meta/meta.dart';
import 'package:neon/src/bloc/bloc.dart'; import 'package:neon/src/bloc/bloc.dart';
import 'package:neon/src/blocs/accounts.dart'; import 'package:neon/src/blocs/accounts.dart';
import 'package:neon/src/models/account.dart'; import 'package:neon/src/models/account.dart';
@ -13,6 +14,7 @@ abstract class NextPushBlocStates {
BehaviorSubject get onNextPushSupported; BehaviorSubject get onNextPushSupported;
} }
@internal
class NextPushBloc extends Bloc implements NextPushBlocEvents, NextPushBlocStates { class NextPushBloc extends Bloc implements NextPushBlocEvents, NextPushBlocStates {
NextPushBloc( NextPushBloc(
this._accountsBloc, this._accountsBloc,

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

@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:convert'; import 'dart:convert';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:meta/meta.dart';
import 'package:neon/src/bloc/bloc.dart'; import 'package:neon/src/bloc/bloc.dart';
import 'package:neon/src/blocs/accounts.dart'; import 'package:neon/src/blocs/accounts.dart';
import 'package:neon/src/models/account.dart'; import 'package:neon/src/models/account.dart';
@ -20,6 +21,7 @@ abstract class PushNotificationsBlocStates {
Stream<PushNotification> get notifications; Stream<PushNotification> get notifications;
} }
@internal
class PushNotificationsBloc extends Bloc implements PushNotificationsBlocEvents, PushNotificationsBlocStates { class PushNotificationsBloc extends Bloc implements PushNotificationsBlocEvents, PushNotificationsBlocStates {
PushNotificationsBloc( PushNotificationsBloc(
this._accountsBloc, this._accountsBloc,

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

@ -1,5 +1,6 @@
import 'dart:async'; import 'dart:async';
import 'package:meta/meta.dart';
import 'package:neon/src/bloc/bloc.dart'; import 'package:neon/src/bloc/bloc.dart';
import 'package:neon/src/bloc/result.dart'; import 'package:neon/src/bloc/result.dart';
import 'package:neon/src/models/account.dart'; import 'package:neon/src/models/account.dart';
@ -13,6 +14,7 @@ abstract class UserDetailsBlocStates {
BehaviorSubject<Result<ProvisioningApiUserDetails>> get userDetails; BehaviorSubject<Result<ProvisioningApiUserDetails>> get userDetails;
} }
@internal
class UserDetailsBloc extends InteractiveBloc implements UserDetailsBlocEvents, UserDetailsBlocStates { class UserDetailsBloc extends InteractiveBloc implements UserDetailsBlocEvents, UserDetailsBlocStates {
UserDetailsBloc( UserDetailsBloc(
this._requestManager, this._requestManager,

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

@ -1,6 +1,7 @@
import 'dart:async'; import 'dart:async';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:meta/meta.dart';
import 'package:neon/src/bloc/bloc.dart'; import 'package:neon/src/bloc/bloc.dart';
import 'package:neon/src/bloc/result.dart'; import 'package:neon/src/bloc/result.dart';
import 'package:neon/src/blocs/timer.dart'; import 'package:neon/src/blocs/timer.dart';
@ -18,6 +19,7 @@ abstract class UserStatusesBlocStates {
BehaviorSubject<Map<String, Result<UserStatusPublicStatus?>>> get statuses; BehaviorSubject<Map<String, Result<UserStatusPublicStatus?>>> get statuses;
} }
@internal
class UserStatusesBloc extends InteractiveBloc implements UserStatusesBlocEvents, UserStatusesBlocStates { class UserStatusesBloc extends InteractiveBloc implements UserStatusesBlocEvents, UserStatusesBlocStates {
UserStatusesBloc( UserStatusesBloc(
this._platform, this._platform,

3
packages/neon/neon/lib/src/models/push_notification.dart

@ -1,11 +1,12 @@
import 'package:flutter/foundation.dart';
import 'package:json_annotation/json_annotation.dart'; import 'package:json_annotation/json_annotation.dart';
import 'package:meta/meta.dart';
import 'package:nextcloud/nextcloud.dart'; import 'package:nextcloud/nextcloud.dart';
part 'push_notification.g.dart'; part 'push_notification.g.dart';
@JsonSerializable() @JsonSerializable()
@immutable @immutable
@internal
class PushNotification { class PushNotification {
const PushNotification({ const PushNotification({
required this.accountID, required this.accountID,

2
packages/neon/neon/lib/src/platform/android.dart

@ -1,9 +1,11 @@
import 'package:meta/meta.dart';
import 'package:neon/src/platform/platform.dart'; import 'package:neon/src/platform/platform.dart';
import 'package:neon/src/utils/exceptions.dart'; import 'package:neon/src/utils/exceptions.dart';
import 'package:path/path.dart' as p; import 'package:path/path.dart' as p;
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
@internal
class AndroidNeonPlatform extends NeonPlatform { class AndroidNeonPlatform extends NeonPlatform {
AndroidNeonPlatform() AndroidNeonPlatform()
: super( : super(

2
packages/neon/neon/lib/src/platform/linux.dart

@ -1,10 +1,12 @@
import 'dart:io'; import 'dart:io';
import 'package:meta/meta.dart';
import 'package:neon/src/platform/platform.dart'; import 'package:neon/src/platform/platform.dart';
import 'package:path/path.dart' as p; import 'package:path/path.dart' as p;
import 'package:sqflite_common_ffi/sqflite_ffi.dart'; import 'package:sqflite_common_ffi/sqflite_ffi.dart';
import 'package:xdg_directories/xdg_directories.dart' as xdg; import 'package:xdg_directories/xdg_directories.dart' as xdg;
@internal
class LinuxNeonPlatform extends NeonPlatform { class LinuxNeonPlatform extends NeonPlatform {
LinuxNeonPlatform() LinuxNeonPlatform()
: super( : super(

2
packages/neon/neon/lib/src/settings/models/option.dart

@ -6,9 +6,11 @@ import 'package:neon/src/settings/models/storage.dart';
import 'package:neon/src/settings/widgets/label_builder.dart'; import 'package:neon/src/settings/widgets/label_builder.dart';
import 'package:rxdart/rxdart.dart'; import 'package:rxdart/rxdart.dart';
@internal
class OptionDisableException implements Exception {} class OptionDisableException implements Exception {}
@immutable @immutable
@internal
abstract class Option<T> { abstract class Option<T> {
Option({ Option({
required this.storage, required this.storage,

2
packages/neon/neon/lib/src/settings/widgets/account_settings_tile.dart

@ -1,8 +1,10 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
import 'package:neon/src/models/account.dart'; import 'package:neon/src/models/account.dart';
import 'package:neon/src/settings/widgets/settings_tile.dart'; import 'package:neon/src/settings/widgets/settings_tile.dart';
import 'package:neon/src/widgets/account_tile.dart'; import 'package:neon/src/widgets/account_tile.dart';
@internal
class AccountSettingsTile extends SettingsTile { class AccountSettingsTile extends SettingsTile {
const AccountSettingsTile({ const AccountSettingsTile({
required this.account, required this.account,

2
packages/neon/neon/lib/src/settings/widgets/checkbox_settings_tile.dart

@ -1,8 +1,10 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
import 'package:neon/src/settings/models/toggle_option.dart'; import 'package:neon/src/settings/models/toggle_option.dart';
import 'package:neon/src/settings/widgets/option_builder.dart'; import 'package:neon/src/settings/widgets/option_builder.dart';
import 'package:neon/src/settings/widgets/settings_tile.dart'; import 'package:neon/src/settings/widgets/settings_tile.dart';
@internal
class CheckBoxSettingsTile extends InputSettingsTile<ToggleOption> { class CheckBoxSettingsTile extends InputSettingsTile<ToggleOption> {
const CheckBoxSettingsTile({ const CheckBoxSettingsTile({
required super.option, required super.option,

2
packages/neon/neon/lib/src/settings/widgets/custom_settings_tile.dart

@ -1,6 +1,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
import 'package:neon/src/settings/widgets/settings_tile.dart'; import 'package:neon/src/settings/widgets/settings_tile.dart';
@internal
class CustomSettingsTile extends SettingsTile { class CustomSettingsTile extends SettingsTile {
const CustomSettingsTile({ const CustomSettingsTile({
this.title, this.title,

2
packages/neon/neon/lib/src/settings/widgets/dropdown_button_settings_tile.dart

@ -1,9 +1,11 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
import 'package:neon/src/settings/models/select_option.dart'; import 'package:neon/src/settings/models/select_option.dart';
import 'package:neon/src/settings/widgets/label_builder.dart'; import 'package:neon/src/settings/widgets/label_builder.dart';
import 'package:neon/src/settings/widgets/option_builder.dart'; import 'package:neon/src/settings/widgets/option_builder.dart';
import 'package:neon/src/settings/widgets/settings_tile.dart'; import 'package:neon/src/settings/widgets/settings_tile.dart';
@internal
class DropdownButtonSettingsTile<T> extends InputSettingsTile<SelectOption<T>> { class DropdownButtonSettingsTile<T> extends InputSettingsTile<SelectOption<T>> {
const DropdownButtonSettingsTile({ const DropdownButtonSettingsTile({
required super.option, required super.option,

2
packages/neon/neon/lib/src/settings/widgets/label_builder.dart

@ -1,3 +1,5 @@
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:meta/meta.dart';
@internal
typedef LabelBuilder = String Function(BuildContext); typedef LabelBuilder = String Function(BuildContext);

2
packages/neon/neon/lib/src/settings/widgets/settings_category.dart

@ -1,7 +1,9 @@
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:intersperse/intersperse.dart'; import 'package:intersperse/intersperse.dart';
import 'package:meta/meta.dart';
import 'package:neon/src/settings/widgets/settings_tile.dart'; import 'package:neon/src/settings/widgets/settings_tile.dart';
@internal
class SettingsCategory extends StatelessWidget { class SettingsCategory extends StatelessWidget {
const SettingsCategory({ const SettingsCategory({
required this.tiles, required this.tiles,

2
packages/neon/neon/lib/src/settings/widgets/settings_list.dart

@ -1,7 +1,9 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:intersperse/intersperse.dart'; import 'package:intersperse/intersperse.dart';
import 'package:meta/meta.dart';
import 'package:neon/src/settings/widgets/settings_category.dart'; import 'package:neon/src/settings/widgets/settings_category.dart';
@internal
class SettingsList extends StatelessWidget { class SettingsList extends StatelessWidget {
const SettingsList({ const SettingsList({
required this.categories, required this.categories,

3
packages/neon/neon/lib/src/settings/widgets/settings_tile.dart

@ -1,12 +1,15 @@
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:meta/meta.dart';
import 'package:neon/src/settings/models/option.dart'; import 'package:neon/src/settings/models/option.dart';
@internal
abstract class SettingsTile extends StatelessWidget { abstract class SettingsTile extends StatelessWidget {
const SettingsTile({ const SettingsTile({
super.key, super.key,
}); });
} }
@internal
abstract class InputSettingsTile<T extends Option> extends SettingsTile { abstract class InputSettingsTile<T extends Option> extends SettingsTile {
const InputSettingsTile({ const InputSettingsTile({
required this.option, required this.option,

2
packages/neon/neon/lib/src/settings/widgets/text_settings_tile.dart

@ -1,6 +1,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
import 'package:neon/src/settings/widgets/settings_tile.dart'; import 'package:neon/src/settings/widgets/settings_tile.dart';
@internal
class TextSettingsTile extends SettingsTile { class TextSettingsTile extends SettingsTile {
const TextSettingsTile({ const TextSettingsTile({
required this.text, required this.text,

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

@ -1,5 +1,6 @@
import 'dart:async'; import 'dart:async';
import 'package:meta/meta.dart';
import 'package:neon/l10n/localizations.dart'; import 'package:neon/l10n/localizations.dart';
import 'package:neon/src/blocs/apps.dart'; import 'package:neon/src/blocs/apps.dart';
import 'package:neon/src/settings/models/option.dart'; import 'package:neon/src/settings/models/option.dart';
@ -8,6 +9,7 @@ import 'package:neon/src/settings/models/storage.dart';
import 'package:neon/src/settings/widgets/label_builder.dart'; import 'package:neon/src/settings/widgets/label_builder.dart';
import 'package:rxdart/rxdart.dart'; import 'package:rxdart/rxdart.dart';
@internal
class AccountSpecificOptions { class AccountSpecificOptions {
AccountSpecificOptions( AccountSpecificOptions(
this._storage, this._storage,

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

@ -1,5 +1,7 @@
import 'package:meta/meta.dart';
import 'package:neon/src/models/push_notification.dart'; import 'package:neon/src/models/push_notification.dart';
@internal
class Global { class Global {
static Function(String accountID)? onPushNotificationReceived; static Function(String accountID)? onPushNotificationReceived;
static Function(PushNotification notification)? onPushNotificationClicked; static Function(PushNotification notification)? onPushNotificationClicked;

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

@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:io'; import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
import 'package:neon/l10n/localizations.dart'; import 'package:neon/l10n/localizations.dart';
import 'package:neon/src/models/account.dart'; import 'package:neon/src/models/account.dart';
import 'package:neon/src/settings/models/option.dart'; import 'package:neon/src/settings/models/option.dart';
@ -16,6 +17,7 @@ import 'package:shared_preferences/shared_preferences.dart';
const unifiedPushNextPushID = 'org.unifiedpush.distributor.nextpush'; const unifiedPushNextPushID = 'org.unifiedpush.distributor.nextpush';
@internal
class GlobalOptions { class GlobalOptions {
GlobalOptions( GlobalOptions(
this._sharedPreferences, this._sharedPreferences,

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

@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
import 'package:neon/l10n/localizations.dart'; import 'package:neon/l10n/localizations.dart';
import 'package:neon/src/blocs/first_launch.dart'; import 'package:neon/src/blocs/first_launch.dart';
import 'package:neon/src/blocs/next_push.dart'; import 'package:neon/src/blocs/next_push.dart';
@ -7,6 +8,7 @@ import 'package:neon/src/utils/global_options.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher_string.dart'; import 'package:url_launcher/url_launcher_string.dart';
@internal
class GlobalPopups { class GlobalPopups {
factory GlobalPopups() => instance ??= GlobalPopups._(); factory GlobalPopups() => instance ??= GlobalPopups._();

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

@ -1,11 +1,13 @@
import 'dart:ui'; import 'dart:ui';
import 'package:intl/intl_standalone.dart'; import 'package:intl/intl_standalone.dart';
import 'package:meta/meta.dart';
import 'package:neon/l10n/localizations.dart'; import 'package:neon/l10n/localizations.dart';
/// Loads the [AppLocalizations] for the system [Locale]. /// Loads the [AppLocalizations] for the system [Locale].
/// ///
/// When the system locale is not supported [fallbackLocale] will be used. /// When the system locale is not supported [fallbackLocale] will be used.
@internal
Future<AppLocalizations> appLocalizationsFromSystem([final Locale fallbackLocale = const Locale('en', 'US')]) async { Future<AppLocalizations> appLocalizationsFromSystem([final Locale fallbackLocale = const Locale('en', 'US')]) async {
final systemLocale = await findSystemLocale(); final systemLocale = await findSystemLocale();
final parts = systemLocale.split('_').map((final a) => a.split('.')).expand((final e) => e).toList(); final parts = systemLocale.split('_').map((final a) => a.split('.')).expand((final e) => e).toList();

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

@ -8,6 +8,7 @@ import 'package:flutter/widgets.dart';
import 'package:flutter_cache_manager/flutter_cache_manager.dart'; import 'package:flutter_cache_manager/flutter_cache_manager.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:flutter_svg/flutter_svg.dart' show SvgFileLoader, vg; import 'package:flutter_svg/flutter_svg.dart' show SvgFileLoader, vg;
import 'package:meta/meta.dart';
import 'package:neon/src/blocs/accounts.dart'; import 'package:neon/src/blocs/accounts.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';
@ -20,6 +21,7 @@ import 'package:neon/src/utils/theme.dart';
import 'package:nextcloud/nextcloud.dart'; import 'package:nextcloud/nextcloud.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@internal
class PushUtils { class PushUtils {
static Future<RSAKeypair> loadRSAKeypair(final AppStorage storage) async { static Future<RSAKeypair> loadRSAKeypair(final AppStorage storage) async {
const keyDevicePrivateKey = 'device-private-key'; const keyDevicePrivateKey = 'device-private-key';

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

@ -1,8 +1,10 @@
import 'package:meta/meta.dart';
import 'package:neon/src/models/account.dart'; import 'package:neon/src/models/account.dart';
import 'package:neon/src/models/app_implementation.dart'; import 'package:neon/src/models/app_implementation.dart';
import 'package:neon/src/settings/models/option.dart'; import 'package:neon/src/settings/models/option.dart';
import 'package:neon/src/utils/global_options.dart'; import 'package:neon/src/utils/global_options.dart';
@internal
class SettingsExportHelper { class SettingsExportHelper {
SettingsExportHelper({ SettingsExportHelper({
required this.globalOptions, required this.globalOptions,

3
packages/neon/neon/lib/src/utils/theme.dart

@ -1,9 +1,12 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
import 'package:neon/src/utils/hex_color.dart'; import 'package:neon/src/utils/hex_color.dart';
import 'package:nextcloud/nextcloud.dart'; import 'package:nextcloud/nextcloud.dart';
@internal
const themePrimaryColor = Color(0xFFF37736); const themePrimaryColor = Color(0xFFF37736);
@internal
ThemeData getThemeFromNextcloudTheme( ThemeData getThemeFromNextcloudTheme(
final CoreServerCapabilities_Ocs_Data_Capabilities_Theming? nextcloudTheme, final CoreServerCapabilities_Ocs_Data_Capabilities_Theming? nextcloudTheme,
final Brightness brightness, { final Brightness brightness, {

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

@ -1,4 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
import 'package:neon/src/bloc/result_builder.dart'; import 'package:neon/src/bloc/result_builder.dart';
import 'package:neon/src/blocs/accounts.dart'; import 'package:neon/src/blocs/accounts.dart';
import 'package:neon/src/models/account.dart'; import 'package:neon/src/models/account.dart';
@ -8,6 +9,7 @@ import 'package:neon/src/widgets/user_avatar.dart';
import 'package:nextcloud/nextcloud.dart'; import 'package:nextcloud/nextcloud.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@internal
class NeonAccountTile extends StatelessWidget { class NeonAccountTile extends StatelessWidget {
const NeonAccountTile({ const NeonAccountTile({
required this.account, required this.account,

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

@ -1,7 +1,9 @@
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:meta/meta.dart';
import 'package:neon/src/models/app_implementation.dart'; import 'package:neon/src/models/app_implementation.dart';
import 'package:neon/src/widgets/user_avatar.dart'; import 'package:neon/src/widgets/user_avatar.dart';
@internal
class NeonAppImplementationIcon extends StatelessWidget { class NeonAppImplementationIcon extends StatelessWidget {
const NeonAppImplementationIcon({ const NeonAppImplementationIcon({
required this.appImplementation, required this.appImplementation,

7
packages/neon/neon/lib/src/widgets/drawer_destination.dart

@ -1,9 +1,12 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
import 'package:neon/src/widgets/user_avatar.dart'; import 'package:neon/src/widgets/user_avatar.dart';
import 'package:rxdart/subjects.dart'; import 'package:rxdart/subjects.dart';
@internal
typedef DestinationIconBuilder = Widget Function({Size size, Color color}); typedef DestinationIconBuilder = Widget Function({Size size, Color color});
@internal
class NeonNavigationDestination { class NeonNavigationDestination {
const NeonNavigationDestination({ const NeonNavigationDestination({
required this.label, required this.label,
@ -18,6 +21,7 @@ class NeonNavigationDestination {
final BehaviorSubject<int>? notificationCount; final BehaviorSubject<int>? notificationCount;
} }
@internal
extension NavigationDestinationExtension on NavigationDestination { extension NavigationDestinationExtension on NavigationDestination {
static NavigationDestination fromNeonDestination(final NeonNavigationDestination neonDestination) => static NavigationDestination fromNeonDestination(final NeonNavigationDestination neonDestination) =>
NavigationDestination( NavigationDestination(
@ -27,6 +31,7 @@ extension NavigationDestinationExtension on NavigationDestination {
); );
} }
@internal
extension NavigationRailDestinationExtension on NavigationRailDestination { extension NavigationRailDestinationExtension on NavigationRailDestination {
static NavigationRailDestination fromNeonDestination(final NeonNavigationDestination neonDestination) { static NavigationRailDestination fromNeonDestination(final NeonNavigationDestination neonDestination) {
final iconWIdget = StreamBuilder( final iconWIdget = StreamBuilder(
@ -79,6 +84,7 @@ extension NavigationRailDestinationExtension on NavigationRailDestination {
} }
} }
@internal
extension NavigationDrawerDestinationExtension on NavigationDrawerDestination { extension NavigationDrawerDestinationExtension on NavigationDrawerDestination {
static NavigationDrawerDestination fromNeonDestination(final NeonNavigationDestination neonDestination) { static NavigationDrawerDestination fromNeonDestination(final NeonNavigationDestination neonDestination) {
final labelWidget = StreamBuilder( final labelWidget = StreamBuilder(
@ -129,6 +135,7 @@ extension NavigationDrawerDestinationExtension on NavigationDrawerDestination {
} }
} }
@internal
extension TabExtension on Tab { extension TabExtension on Tab {
static Tab fromNeonDestination(final NeonNavigationDestination neonDestination) => Tab( static Tab fromNeonDestination(final NeonNavigationDestination neonDestination) => Tab(
text: neonDestination.label, text: neonDestination.label,

Loading…
Cancel
Save