diff --git a/packages/neon/neon/lib/src/blocs/accounts.dart b/packages/neon/neon/lib/src/blocs/accounts.dart index f6d43310..e6304d20 100644 --- a/packages/neon/neon/lib/src/blocs/accounts.dart +++ b/packages/neon/neon/lib/src/blocs/accounts.dart @@ -140,7 +140,7 @@ class AccountsBloc extends Bloc implements AccountsBlocEvents, AccountsBlocState BehaviorSubject> accounts = BehaviorSubject>.seeded([]); @override - BehaviorSubject activeAccount = BehaviorSubject(); + BehaviorSubject activeAccount = BehaviorSubject(); @override void addAccount(final Account account) { diff --git a/packages/neon/neon/lib/src/blocs/apps.dart b/packages/neon/neon/lib/src/blocs/apps.dart index 2d1feae5..77f2cdc3 100644 --- a/packages/neon/neon/lib/src/blocs/apps.dart +++ b/packages/neon/neon/lib/src/blocs/apps.dart @@ -175,18 +175,17 @@ class AppsBloc extends InteractiveBloc implements AppsBlocEvents, AppsBlocStates } @override - BehaviorSubject activeApp = BehaviorSubject(); + BehaviorSubject activeApp = BehaviorSubject(); @override BehaviorSubject>>> appImplementations = - BehaviorSubject>>(); + BehaviorSubject(); @override - BehaviorSubject>> apps = BehaviorSubject>>(); + BehaviorSubject>> apps = BehaviorSubject(); @override - BehaviorSubject> notificationsAppImplementation = - BehaviorSubject>(); + BehaviorSubject> notificationsAppImplementation = BehaviorSubject(); @override BehaviorSubject openNotifications = BehaviorSubject(); @@ -196,8 +195,7 @@ class AppsBloc extends InteractiveBloc implements AppsBlocEvents, AppsBlocStates @override Future refresh() async { - await RequestManager.instance - .wrapNextcloud, CoreNavigationGetAppsNavigationResponseApplicationJson, void>( + await RequestManager.instance.wrapNextcloud( _account.id, 'apps-apps', apps, diff --git a/packages/neon/neon/lib/src/blocs/capabilities.dart b/packages/neon/neon/lib/src/blocs/capabilities.dart index f67a1d43..e55ae135 100644 --- a/packages/neon/neon/lib/src/blocs/capabilities.dart +++ b/packages/neon/neon/lib/src/blocs/capabilities.dart @@ -33,13 +33,11 @@ class CapabilitiesBloc extends InteractiveBloc implements CapabilitiesBlocEvents } @override - BehaviorSubject> capabilities = - BehaviorSubject>(); + BehaviorSubject> capabilities = BehaviorSubject(); @override Future refresh() async { - await RequestManager.instance.wrapNextcloud( + await RequestManager.instance.wrapNextcloud( _account.id, 'capabilities', capabilities, diff --git a/packages/neon/neon/lib/src/blocs/login_flow.dart b/packages/neon/neon/lib/src/blocs/login_flow.dart index 2f640bdd..6b9f8eec 100644 --- a/packages/neon/neon/lib/src/blocs/login_flow.dart +++ b/packages/neon/neon/lib/src/blocs/login_flow.dart @@ -43,7 +43,7 @@ class LoginFlowBloc extends InteractiveBloc implements LoginFlowBlocEvents, Logi } @override - BehaviorSubject> init = BehaviorSubject>(); + BehaviorSubject> init = BehaviorSubject(); @override late Stream result = _resultController.stream.asBroadcastStream(); diff --git a/packages/neon/neon/lib/src/blocs/user_details.dart b/packages/neon/neon/lib/src/blocs/user_details.dart index 2336ab9c..2dd3c94c 100644 --- a/packages/neon/neon/lib/src/blocs/user_details.dart +++ b/packages/neon/neon/lib/src/blocs/user_details.dart @@ -33,13 +33,11 @@ class UserDetailsBloc extends InteractiveBloc implements UserDetailsBlocEvents, } @override - BehaviorSubject> userDetails = - BehaviorSubject>(); + BehaviorSubject> userDetails = BehaviorSubject(); @override Future refresh() async { - await RequestManager.instance - .wrapNextcloud( + await RequestManager.instance.wrapNextcloud( _account.id, 'user-details', userDetails, diff --git a/packages/neon/neon/lib/src/blocs/user_statuses.dart b/packages/neon/neon/lib/src/blocs/user_statuses.dart index eee802de..00715989 100644 --- a/packages/neon/neon/lib/src/blocs/user_statuses.dart +++ b/packages/neon/neon/lib/src/blocs/user_statuses.dart @@ -41,8 +41,7 @@ class UserStatusesBloc extends InteractiveBloc implements UserStatusesBlocEvents } @override - BehaviorSubject>> statuses = - BehaviorSubject>>(); + BehaviorSubject>> statuses = BehaviorSubject(); @override Future refresh() async { diff --git a/packages/neon/neon/lib/src/pages/home.dart b/packages/neon/neon/lib/src/pages/home.dart index 7b92e574..aa020935 100644 --- a/packages/neon/neon/lib/src/pages/home.dart +++ b/packages/neon/neon/lib/src/pages/home.dart @@ -148,7 +148,7 @@ class _HomePageState extends State { ); } - return StreamBuilder( + return StreamBuilder( stream: _appsBloc.activeApp, builder: (final context, final activeAppIDSnapshot) { if (!activeAppIDSnapshot.hasData) { @@ -163,7 +163,7 @@ class _HomePageState extends State { }, ); - final body = ValueListenableBuilder( + final body = ValueListenableBuilder( valueListenable: _globalOptions.navigationMode, builder: (final context, final navigationMode, final _) { final drawerAlwaysVisible = navigationMode == global_options.NavigationMode.drawerAlwaysVisible; diff --git a/packages/neon/neon/lib/src/pages/settings.dart b/packages/neon/neon/lib/src/pages/settings.dart index d4b4cd42..2239a670 100644 --- a/packages/neon/neon/lib/src/pages/settings.dart +++ b/packages/neon/neon/lib/src/pages/settings.dart @@ -4,7 +4,6 @@ import 'package:flutter_material_design_icons/flutter_material_design_icons.dart import 'package:meta/meta.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/models/app_implementation.dart'; import 'package:neon/src/platform/platform.dart'; import 'package:neon/src/router.dart'; @@ -82,14 +81,14 @@ class _SettingsPageState extends State { ), ], ); - final body = StreamBuilder>( + final body = StreamBuilder( stream: accountsBloc.accounts, initialData: accountsBloc.accounts.valueOrNull, builder: ( final context, final accountsSnapshot, ) => - ValueListenableBuilder( + ValueListenableBuilder( valueListenable: globalOptions.pushNotificationsEnabled, builder: ( final context, diff --git a/packages/neon/neon/lib/src/utils/global_options.dart b/packages/neon/neon/lib/src/utils/global_options.dart index ef06626f..203f24df 100644 --- a/packages/neon/neon/lib/src/utils/global_options.dart +++ b/packages/neon/neon/lib/src/utils/global_options.dart @@ -114,7 +114,7 @@ class GlobalOptions extends OptionsCollection { } } - late final themeMode = SelectOption( + late final themeMode = SelectOption( storage: storage, key: GlobalOptionKeys.themeMode, label: (final context) => AppLocalizations.of(context).globalOptionsThemeMode, @@ -202,7 +202,7 @@ class GlobalOptions extends OptionsCollection { values: {}, ); - late final navigationMode = SelectOption( + late final navigationMode = SelectOption( storage: storage, key: GlobalOptionKeys.navigationMode, label: (final context) => AppLocalizations.of(context).globalOptionsNavigationMode, diff --git a/packages/neon/neon/lib/src/widgets/app_bar.dart b/packages/neon/neon/lib/src/widgets/app_bar.dart index d2ece2c6..ecb20c85 100644 --- a/packages/neon/neon/lib/src/widgets/app_bar.dart +++ b/packages/neon/neon/lib/src/widgets/app_bar.dart @@ -64,9 +64,9 @@ class _NeonAppBarState extends State { @override Widget build(final BuildContext context) => ResultBuilder>.behaviorSubject( stream: appsBloc.appImplementations, - builder: (final context, final appImplementations) => StreamBuilder( + builder: (final context, final appImplementations) => StreamBuilder( stream: appsBloc.activeApp, - builder: (final context, final activeAppSnapshot) => StreamBuilder( + builder: (final context, final activeAppSnapshot) => StreamBuilder( stream: unifiedSearchBloc.enabled, builder: (final context, final unifiedSearchEnabledSnapshot) { final unifiedSearchEnabled = unifiedSearchEnabledSnapshot.data ?? false; diff --git a/packages/neon/neon/lib/src/widgets/image.dart b/packages/neon/neon/lib/src/widgets/image.dart index 25d55675..b1ebec7b 100644 --- a/packages/neon/neon/lib/src/widgets/image.dart +++ b/packages/neon/neon/lib/src/widgets/image.dart @@ -177,7 +177,7 @@ class NeonCachedImage extends StatefulWidget { class _NeonCachedImageState extends State { @override Widget build(final BuildContext context) => Center( - child: FutureBuilder( + child: FutureBuilder( future: widget.image, builder: (final context, final fileSnapshot) { if (fileSnapshot.hasError) { diff --git a/packages/neon/neon/lib/src/widgets/user_avatar.dart b/packages/neon/neon/lib/src/widgets/user_avatar.dart index 92ec11ee..7c3a9356 100644 --- a/packages/neon/neon/lib/src/widgets/user_avatar.dart +++ b/packages/neon/neon/lib/src/widgets/user_avatar.dart @@ -82,7 +82,7 @@ class _UserAvatarState extends State { alignment: Alignment.center, children: [ avatar, - ResultBuilder( + ResultBuilder( stream: _userStatusBloc.statuses.mapNotNull((final statuses) => statuses[widget.username]), builder: _userStatusIconBuilder, ),