Browse Source

neon: Remove unused Bloc generic in ResultBuilder

pull/320/head
jld3103 2 years ago
parent
commit
8c4d643e37
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      packages/neon/neon/lib/src/pages/account_settings.dart
  2. 6
      packages/neon/neon/lib/src/pages/home.dart
  3. 2
      packages/neon/neon/lib/src/widgets/account_avatar.dart
  4. 2
      packages/neon/neon/lib/src/widgets/account_tile.dart
  5. 2
      packages/neon/neon/lib/src/widgets/result_builder.dart
  6. 2
      packages/neon/neon_files/lib/widgets/browser_view.dart
  7. 2
      packages/neon/neon_news/lib/dialogs/add_feed.dart
  8. 4
      packages/neon/neon_news/lib/widgets/articles_view.dart
  9. 4
      packages/neon/neon_news/lib/widgets/feeds_view.dart
  10. 4
      packages/neon/neon_news/lib/widgets/folders_view.dart
  11. 2
      packages/neon/neon_notes/lib/dialogs/create_note.dart
  12. 2
      packages/neon/neon_notes/lib/dialogs/select_category.dart
  13. 2
      packages/neon/neon_notes/lib/widgets/categories_view.dart
  14. 2
      packages/neon/neon_notes/lib/widgets/notes_view.dart
  15. 3
      packages/neon/neon_notifications/lib/pages/main.dart

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

@ -50,7 +50,7 @@ class AccountSettingsPage extends StatelessWidget {
),
],
),
body: ResultBuilder<UserDetailsBloc, NextcloudProvisioningApiUserDetails>(
body: ResultBuilder<NextcloudProvisioningApiUserDetails>(
stream: _userDetailsBloc.userDetails,
builder: (final context, final userDetails) => SettingsList(
categories: [

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

@ -181,11 +181,11 @@ class _HomePageState extends State<HomePage> {
}
@override
Widget build(final BuildContext context) => ResultBuilder<CapabilitiesBloc, Capabilities>(
Widget build(final BuildContext context) => ResultBuilder<Capabilities>(
stream: _capabilitiesBloc.capabilities,
builder: (final context, final capabilities) => ResultBuilder<AppsBloc, List<AppImplementation>>(
builder: (final context, final capabilities) => ResultBuilder<List<AppImplementation>>(
stream: _appsBloc.appImplementations,
builder: (final context, final appImplementations) => ResultBuilder<AppsBloc, NotificationsAppInterface?>(
builder: (final context, final appImplementations) => ResultBuilder<NotificationsAppInterface?>(
stream: _appsBloc.notificationsAppImplementation,
builder: (final context, final notificationsAppImplementation) => StreamBuilder<String?>(
stream: _appsBloc.activeAppID,

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

@ -41,7 +41,7 @@ class NeonAccountAvatar extends StatelessWidget {
),
),
),
ResultBuilder<UserStatusBloc, NextcloudUserStatusStatus?>(
ResultBuilder<NextcloudUserStatusStatus?>(
stream: userStatusBloc.userStatus,
builder: (final context, final userStatus) {
final hasEmoji = userStatus.data?.icon != null;

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

@ -38,7 +38,7 @@ class NeonAccountTile extends StatelessWidget {
account: account,
),
),
title: ResultBuilder<UserDetailsBloc, NextcloudProvisioningApiUserDetails>(
title: ResultBuilder<NextcloudProvisioningApiUserDetails>(
stream: userDetailsBloc.userDetails,
builder: (final context, final userDetails) => Row(
children: [

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

@ -1,6 +1,6 @@
part of '../../neon.dart';
class ResultBuilder<T extends Bloc, R> extends StatelessWidget {
class ResultBuilder<R> extends StatelessWidget {
const ResultBuilder({
required this.stream,
required this.builder,

2
packages/neon/neon_files/lib/widgets/browser_view.dart

@ -34,7 +34,7 @@ class _FilesBrowserViewState extends State<FilesBrowserView> {
}
@override
Widget build(final BuildContext context) => ResultBuilder<FilesBrowserBloc, List<WebDavFile>>(
Widget build(final BuildContext context) => ResultBuilder<List<WebDavFile>>(
stream: widget.bloc.files,
builder: (final context, final files) => StreamBuilder<List<String>>(
stream: widget.bloc.path,

2
packages/neon/neon_news/lib/dialogs/add_feed.dart

@ -43,7 +43,7 @@ class _NewsAddFeedDialogState extends State<NewsAddFeedDialog> {
}
@override
Widget build(final BuildContext context) => ResultBuilder<NewsBloc, List<NextcloudNewsFolder>>(
Widget build(final BuildContext context) => ResultBuilder<List<NextcloudNewsFolder>>(
stream: widget.bloc.folders,
builder: (final context, final folders) => NeonDialog(
title: Text(AppLocalizations.of(context).newsAddFeed),

4
packages/neon/neon_news/lib/widgets/articles_view.dart

@ -25,9 +25,9 @@ class _NewsArticlesViewState extends State<NewsArticlesView> {
}
@override
Widget build(final BuildContext context) => ResultBuilder<NewsBloc, List<NextcloudNewsFeed>>(
Widget build(final BuildContext context) => ResultBuilder<List<NextcloudNewsFeed>>(
stream: widget.newsBloc.feeds,
builder: (final context, final feeds) => ResultBuilder<NewsArticlesBloc, List<NextcloudNewsArticle>>(
builder: (final context, final feeds) => ResultBuilder<List<NextcloudNewsArticle>>(
stream: widget.bloc.articles,
builder: (final context, final articles) => Scaffold(
resizeToAvoidBottomInset: false,

4
packages/neon/neon_news/lib/widgets/feeds_view.dart

@ -11,9 +11,9 @@ class NewsFeedsView extends StatelessWidget {
final int? folderID;
@override
Widget build(final BuildContext context) => ResultBuilder<NewsBloc, List<NextcloudNewsFolder>>(
Widget build(final BuildContext context) => ResultBuilder<List<NextcloudNewsFolder>>(
stream: bloc.folders,
builder: (final context, final folders) => ResultBuilder<NewsBloc, List<NextcloudNewsFeed>>(
builder: (final context, final folders) => ResultBuilder<List<NextcloudNewsFeed>>(
stream: bloc.feeds,
builder: (final context, final feeds) => Scaffold(
resizeToAvoidBottomInset: false,

4
packages/neon/neon_news/lib/widgets/folders_view.dart

@ -23,9 +23,9 @@ class NewsFoldersView extends StatelessWidget {
},
child: const Icon(Icons.add),
),
body: ResultBuilder<NewsBloc, List<NextcloudNewsFolder>>(
body: ResultBuilder<List<NextcloudNewsFolder>>(
stream: bloc.folders,
builder: (final context, final folders) => ResultBuilder<NewsBloc, List<NextcloudNewsFeed>>(
builder: (final context, final folders) => ResultBuilder<List<NextcloudNewsFeed>>(
stream: bloc.feeds,
builder: (final context, final feeds) => SortBoxBuilder<FoldersSortProperty, FolderFeedsWrapper>(
sortBox: foldersSortBox,

2
packages/neon/neon_notes/lib/dialogs/create_note.dart

@ -26,7 +26,7 @@ class _NotesCreateNoteDialogState extends State<NotesCreateNoteDialog> {
}
@override
Widget build(final BuildContext context) => ResultBuilder<NotesBloc, List<NextcloudNotesNote>>(
Widget build(final BuildContext context) => ResultBuilder<List<NextcloudNotesNote>>(
stream: widget.bloc.notes,
builder: (final context, final notes) => NeonDialog(
title: Text(AppLocalizations.of(context).notesCreateNote),

2
packages/neon/neon_notes/lib/dialogs/select_category.dart

@ -26,7 +26,7 @@ class _NotesSelectCategoryDialogState extends State<NotesSelectCategoryDialog> {
}
@override
Widget build(final BuildContext context) => ResultBuilder<NotesBloc, List<NextcloudNotesNote>>(
Widget build(final BuildContext context) => ResultBuilder<List<NextcloudNotesNote>>(
stream: widget.bloc.notes,
builder: (final context, final notes) => NeonDialog(
title: Text(AppLocalizations.of(context).notesChangeCategory),

2
packages/neon/neon_notes/lib/widgets/categories_view.dart

@ -9,7 +9,7 @@ class NotesCategoriesView extends StatelessWidget {
final NotesBloc bloc;
@override
Widget build(final BuildContext context) => ResultBuilder<NotesBloc, List<NextcloudNotesNote>>(
Widget build(final BuildContext context) => ResultBuilder<List<NextcloudNotesNote>>(
stream: bloc.notes,
builder: (final context, final notes) => SortBoxBuilder<CategoriesSortProperty, NoteCategory>(
sortBox: categoriesSortBox,

2
packages/neon/neon_notes/lib/widgets/notes_view.dart

@ -11,7 +11,7 @@ class NotesView extends StatelessWidget {
final String? category;
@override
Widget build(final BuildContext context) => ResultBuilder<NotesBloc, List<NextcloudNotesNote>>(
Widget build(final BuildContext context) => ResultBuilder<List<NextcloudNotesNote>>(
stream: bloc.notes,
builder: (final context, final notes) => Scaffold(
resizeToAvoidBottomInset: false,

3
packages/neon/neon_notifications/lib/pages/main.dart

@ -23,8 +23,7 @@ class _NotificationsMainPageState extends State<NotificationsMainPage> {
}
@override
Widget build(final BuildContext context) =>
ResultBuilder<NotificationsBloc, List<NextcloudNotificationsNotification>>(
Widget build(final BuildContext context) => ResultBuilder<List<NextcloudNotificationsNotification>>(
stream: widget.bloc.notifications,
builder: (final context, final notifications) => Scaffold(
resizeToAvoidBottomInset: false,

Loading…
Cancel
Save