123 changed files with 720 additions and 435 deletions
@ -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'; |
@ -0,0 +1,4 @@ |
|||||||
|
export 'package:neon/src/models/account.dart'; |
||||||
|
export 'package:neon/src/models/app_implementation.dart'; |
||||||
|
export 'package:neon/src/models/branding.dart'; |
||||||
|
export 'package:neon/src/models/notifications_interface.dart'; |
@ -0,0 +1 @@ |
|||||||
|
export 'package:neon/src/platform/platform.dart'; |
@ -0,0 +1,6 @@ |
|||||||
|
export 'package:neon/src/settings/models/nextcloud_app_options.dart'; |
||||||
|
export 'package:neon/src/settings/models/options_category.dart'; |
||||||
|
export 'package:neon/src/settings/models/select_option.dart'; |
||||||
|
export 'package:neon/src/settings/models/storage.dart'; |
||||||
|
export 'package:neon/src/settings/models/toggle_option.dart'; |
||||||
|
export 'package:neon/src/settings/widgets/option_builder.dart'; |
@ -0,0 +1,3 @@ |
|||||||
|
export 'package:neon/src/sort_box/sort_box_builder.dart'; |
||||||
|
export 'package:neon/src/sort_box/sort_box_order_option_values.dart'; |
||||||
|
export 'package:sort_box/sort_box.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 { |
abstract class Bloc { |
||||||
void dispose(); |
void dispose(); |
@ -1,4 +1,4 @@ |
|||||||
part of '../../neon.dart'; |
import 'package:meta/meta.dart'; |
||||||
|
|
||||||
@immutable |
@immutable |
||||||
class Result<T> { |
class Result<T> { |
@ -1,4 +1,6 @@ |
|||||||
part of '../../neon.dart'; |
import 'package:flutter/widgets.dart'; |
||||||
|
import 'package:neon/src/bloc/result.dart'; |
||||||
|
import 'package:rxdart/rxdart.dart'; |
||||||
|
|
||||||
typedef ResultWidgetBuilder<T> = Widget Function(BuildContext context, Result<T> snapshot); |
typedef ResultWidgetBuilder<T> = Widget Function(BuildContext context, Result<T> snapshot); |
||||||
|
|
@ -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'; |
|
@ -1,6 +1,21 @@ |
|||||||
part of '../../neon.dart'; |
import 'package:collection/collection.dart'; |
||||||
|
import 'package:flutter/material.dart'; |
||||||
abstract class AppImplementation<T extends Bloc, R extends NextcloudAppSpecificOptions> { |
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/settings/models/nextcloud_app_options.dart'; |
||||||
|
import 'package:neon/src/settings/models/storage.dart'; |
||||||
|
import 'package:neon/src/utils/request_manager.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 NextcloudAppOptions> { |
||||||
AppImplementation( |
AppImplementation( |
||||||
final SharedPreferences sharedPreferences, |
final SharedPreferences sharedPreferences, |
||||||
this.requestManager, |
this.requestManager, |
@ -1,4 +1,4 @@ |
|||||||
part of '../../neon.dart'; |
import 'package:flutter/widgets.dart'; |
||||||
|
|
||||||
@immutable |
@immutable |
||||||
class Branding { |
class Branding { |
@ -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; |
|
||||||
} |
|
@ -1,7 +1,9 @@ |
|||||||
part of '../../neon.dart'; |
import 'package:neon/src/settings/models/option.dart'; |
||||||
|
import 'package:neon/src/settings/models/options_category.dart'; |
||||||
|
import 'package:neon/src/settings/models/storage.dart'; |
||||||
|
|
||||||
abstract class NextcloudAppSpecificOptions { |
abstract class NextcloudAppOptions { |
||||||
NextcloudAppSpecificOptions(this.storage); |
NextcloudAppOptions(this.storage); |
||||||
|
|
||||||
final AppStorage storage; |
final AppStorage storage; |
||||||
late final List<OptionsCategory> categories; |
late final List<OptionsCategory> categories; |
@ -1,8 +1,16 @@ |
|||||||
part of '../../settings.dart'; |
import 'dart:async'; |
||||||
|
|
||||||
|
import 'package:meta/meta.dart'; |
||||||
|
import 'package:neon/src/settings/models/options_category.dart'; |
||||||
|
import 'package:neon/src/settings/models/storage.dart'; |
||||||
|
import 'package:neon/src/settings/widgets/label_builder.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, |
@ -1,4 +1,4 @@ |
|||||||
part of '../../settings.dart'; |
import 'package:neon/src/settings/widgets/label_builder.dart'; |
||||||
|
|
||||||
class OptionsCategory { |
class OptionsCategory { |
||||||
OptionsCategory({ |
OptionsCategory({ |
@ -1,4 +1,8 @@ |
|||||||
part of '../../settings.dart'; |
import 'dart:async'; |
||||||
|
|
||||||
|
import 'package:neon/src/settings/models/option.dart'; |
||||||
|
import 'package:neon/src/settings/widgets/label_builder.dart'; |
||||||
|
import 'package:rxdart/rxdart.dart'; |
||||||
|
|
||||||
class SelectOption<T> extends Option<T> { |
class SelectOption<T> extends Option<T> { |
||||||
SelectOption({ |
SelectOption({ |
@ -1,4 +1,15 @@ |
|||||||
part of '../../neon.dart'; |
import 'package:shared_preferences/shared_preferences.dart'; |
||||||
|
|
||||||
|
abstract interface class SettingsStorage { |
||||||
|
String? getString(final String key); |
||||||
|
|
||||||
|
Future setString(final String key, final String value); |
||||||
|
|
||||||
|
bool? getBool(final String key); |
||||||
|
|
||||||
|
// ignore: avoid_positional_boolean_parameters |
||||||
|
Future setBool(final String key, final bool value); |
||||||
|
} |
||||||
|
|
||||||
class AppStorage implements SettingsStorage { |
class AppStorage implements SettingsStorage { |
||||||
AppStorage( |
AppStorage( |
@ -1,4 +1,5 @@ |
|||||||
part of '../../settings.dart'; |
import 'package:neon/src/settings/models/option.dart'; |
||||||
|
import 'package:rxdart/rxdart.dart'; |
||||||
|
|
||||||
class ToggleOption extends Option<bool> { |
class ToggleOption extends Option<bool> { |
||||||
ToggleOption({ |
ToggleOption({ |
@ -1,7 +1,12 @@ |
|||||||
part of '../../neon.dart'; |
import 'package:flutter/material.dart'; |
||||||
|
import 'package:meta/meta.dart'; |
||||||
|
import 'package:neon/src/models/account.dart'; |
||||||
|
import 'package:neon/src/settings/widgets/settings_tile.dart'; |
||||||
|
import 'package:neon/src/widgets/account_tile.dart'; |
||||||
|
|
||||||
class NeonAccountSettingsTile extends SettingsTile { |
@internal |
||||||
const NeonAccountSettingsTile({ |
class AccountSettingsTile extends SettingsTile { |
||||||
|
const AccountSettingsTile({ |
||||||
required this.account, |
required this.account, |
||||||
this.color, |
this.color, |
||||||
this.trailing, |
this.trailing, |
@ -1,5 +1,10 @@ |
|||||||
part of '../../settings.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/widgets/option_builder.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, |
@ -1,5 +1,8 @@ |
|||||||
part of '../../settings.dart'; |
import 'package:flutter/material.dart'; |
||||||
|
import 'package:meta/meta.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, |
@ -1,5 +1,11 @@ |
|||||||
part of '../../settings.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/widgets/label_builder.dart'; |
||||||
|
import 'package:neon/src/settings/widgets/option_builder.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, |
@ -0,0 +1,5 @@ |
|||||||
|
import 'package:flutter/widgets.dart'; |
||||||
|
import 'package:meta/meta.dart'; |
||||||
|
|
||||||
|
@internal |
||||||
|
typedef LabelBuilder = String Function(BuildContext); |
@ -1,4 +1,5 @@ |
|||||||
part of '../../settings.dart'; |
import 'package:flutter/widgets.dart'; |
||||||
|
import 'package:neon/src/settings/models/option.dart'; |
||||||
|
|
||||||
typedef OptionBuilderFunction<T> = Widget Function(BuildContext context, T snapshot); |
typedef OptionBuilderFunction<T> = Widget Function(BuildContext context, T snapshot); |
||||||
|
|
@ -1,5 +1,9 @@ |
|||||||
part of '../../settings.dart'; |
import 'package:flutter/widgets.dart'; |
||||||
|
import 'package:intersperse/intersperse.dart'; |
||||||
|
import 'package:meta/meta.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, |
@ -1,5 +1,9 @@ |
|||||||
part of '../../settings.dart'; |
import 'package:flutter/material.dart'; |
||||||
|
import 'package:intersperse/intersperse.dart'; |
||||||
|
import 'package:meta/meta.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, |
@ -1,11 +1,15 @@ |
|||||||
part of '../../settings.dart'; |
import 'package:flutter/widgets.dart'; |
||||||
|
import 'package:meta/meta.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, |
@ -1,7 +1,10 @@ |
|||||||
part of '../../neon.dart'; |
import 'package:flutter/material.dart'; |
||||||
|
import 'package:meta/meta.dart'; |
||||||
|
import 'package:neon/src/settings/widgets/settings_tile.dart'; |
||||||
|
|
||||||
class NeonTextSettingsTile extends SettingsTile { |
@internal |
||||||
const NeonTextSettingsTile({ |
class TextSettingsTile extends SettingsTile { |
||||||
|
const TextSettingsTile({ |
||||||
required this.text, |
required this.text, |
||||||
this.style, |
this.style, |
||||||
super.key, |
super.key, |
@ -1,4 +1,7 @@ |
|||||||
part of '../../neon.dart'; |
import 'package:flutter/widgets.dart'; |
||||||
|
import 'package:neon/src/settings/models/select_option.dart'; |
||||||
|
import 'package:neon/src/settings/widgets/option_builder.dart'; |
||||||
|
import 'package:sort_box/sort_box.dart'; |
||||||
|
|
||||||
class SortBoxBuilder<T extends Enum, R> extends StatelessWidget { |
class SortBoxBuilder<T extends Enum, R> extends StatelessWidget { |
||||||
const SortBoxBuilder({ |
const SortBoxBuilder({ |
@ -1,4 +1,6 @@ |
|||||||
part of '../../neon.dart'; |
import 'package:neon/l10n/localizations.dart'; |
||||||
|
import 'package:neon/src/settings/widgets/label_builder.dart'; |
||||||
|
import 'package:sort_box/sort_box.dart'; |
||||||
|
|
||||||
final sortBoxOrderOptionValues = <SortBoxOrder, LabelBuilder>{ |
final sortBoxOrderOptionValues = <SortBoxOrder, LabelBuilder>{ |
||||||
SortBoxOrder.ascending: (final context) => AppLocalizations.of(context).optionsSortOrderAscending, |
SortBoxOrder.ascending: (final context) => AppLocalizations.of(context).optionsSortOrderAscending, |
@ -0,0 +1,6 @@ |
|||||||
|
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/rename_dialog.dart'; |
||||||
|
export 'package:neon/src/utils/request_manager.dart'; |
||||||
|
export 'package:neon/src/utils/validators.dart'; |
@ -0,0 +1,7 @@ |
|||||||
|
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'; |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue