From 8c4d643e3723d2860cdae015fd4218aa0dab953b Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sat, 13 May 2023 15:55:45 +0200 Subject: [PATCH] neon: Remove unused Bloc generic in ResultBuilder --- packages/neon/neon/lib/src/pages/account_settings.dart | 2 +- packages/neon/neon/lib/src/pages/home.dart | 6 +++--- packages/neon/neon/lib/src/widgets/account_avatar.dart | 2 +- packages/neon/neon/lib/src/widgets/account_tile.dart | 2 +- packages/neon/neon/lib/src/widgets/result_builder.dart | 2 +- packages/neon/neon_files/lib/widgets/browser_view.dart | 2 +- packages/neon/neon_news/lib/dialogs/add_feed.dart | 2 +- packages/neon/neon_news/lib/widgets/articles_view.dart | 4 ++-- packages/neon/neon_news/lib/widgets/feeds_view.dart | 4 ++-- packages/neon/neon_news/lib/widgets/folders_view.dart | 4 ++-- packages/neon/neon_notes/lib/dialogs/create_note.dart | 2 +- packages/neon/neon_notes/lib/dialogs/select_category.dart | 2 +- packages/neon/neon_notes/lib/widgets/categories_view.dart | 2 +- packages/neon/neon_notes/lib/widgets/notes_view.dart | 2 +- packages/neon/neon_notifications/lib/pages/main.dart | 3 +-- 15 files changed, 20 insertions(+), 21 deletions(-) diff --git a/packages/neon/neon/lib/src/pages/account_settings.dart b/packages/neon/neon/lib/src/pages/account_settings.dart index 80c8b555..fe525331 100644 --- a/packages/neon/neon/lib/src/pages/account_settings.dart +++ b/packages/neon/neon/lib/src/pages/account_settings.dart @@ -50,7 +50,7 @@ class AccountSettingsPage extends StatelessWidget { ), ], ), - body: ResultBuilder( + body: ResultBuilder( stream: _userDetailsBloc.userDetails, builder: (final context, final userDetails) => SettingsList( categories: [ diff --git a/packages/neon/neon/lib/src/pages/home.dart b/packages/neon/neon/lib/src/pages/home.dart index 0499c322..5c33e844 100644 --- a/packages/neon/neon/lib/src/pages/home.dart +++ b/packages/neon/neon/lib/src/pages/home.dart @@ -181,11 +181,11 @@ class _HomePageState extends State { } @override - Widget build(final BuildContext context) => ResultBuilder( + Widget build(final BuildContext context) => ResultBuilder( stream: _capabilitiesBloc.capabilities, - builder: (final context, final capabilities) => ResultBuilder>( + builder: (final context, final capabilities) => ResultBuilder>( stream: _appsBloc.appImplementations, - builder: (final context, final appImplementations) => ResultBuilder( + builder: (final context, final appImplementations) => ResultBuilder( stream: _appsBloc.notificationsAppImplementation, builder: (final context, final notificationsAppImplementation) => StreamBuilder( stream: _appsBloc.activeAppID, diff --git a/packages/neon/neon/lib/src/widgets/account_avatar.dart b/packages/neon/neon/lib/src/widgets/account_avatar.dart index c1364a4c..4cbf95fe 100644 --- a/packages/neon/neon/lib/src/widgets/account_avatar.dart +++ b/packages/neon/neon/lib/src/widgets/account_avatar.dart @@ -41,7 +41,7 @@ class NeonAccountAvatar extends StatelessWidget { ), ), ), - ResultBuilder( + ResultBuilder( stream: userStatusBloc.userStatus, builder: (final context, final userStatus) { final hasEmoji = userStatus.data?.icon != null; diff --git a/packages/neon/neon/lib/src/widgets/account_tile.dart b/packages/neon/neon/lib/src/widgets/account_tile.dart index ffac71b3..b93dacb9 100644 --- a/packages/neon/neon/lib/src/widgets/account_tile.dart +++ b/packages/neon/neon/lib/src/widgets/account_tile.dart @@ -38,7 +38,7 @@ class NeonAccountTile extends StatelessWidget { account: account, ), ), - title: ResultBuilder( + title: ResultBuilder( stream: userDetailsBloc.userDetails, builder: (final context, final userDetails) => Row( children: [ diff --git a/packages/neon/neon/lib/src/widgets/result_builder.dart b/packages/neon/neon/lib/src/widgets/result_builder.dart index cba7d52e..dfc3965f 100644 --- a/packages/neon/neon/lib/src/widgets/result_builder.dart +++ b/packages/neon/neon/lib/src/widgets/result_builder.dart @@ -1,6 +1,6 @@ part of '../../neon.dart'; -class ResultBuilder extends StatelessWidget { +class ResultBuilder extends StatelessWidget { const ResultBuilder({ required this.stream, required this.builder, diff --git a/packages/neon/neon_files/lib/widgets/browser_view.dart b/packages/neon/neon_files/lib/widgets/browser_view.dart index cca47e36..78b295dc 100644 --- a/packages/neon/neon_files/lib/widgets/browser_view.dart +++ b/packages/neon/neon_files/lib/widgets/browser_view.dart @@ -34,7 +34,7 @@ class _FilesBrowserViewState extends State { } @override - Widget build(final BuildContext context) => ResultBuilder>( + Widget build(final BuildContext context) => ResultBuilder>( stream: widget.bloc.files, builder: (final context, final files) => StreamBuilder>( stream: widget.bloc.path, diff --git a/packages/neon/neon_news/lib/dialogs/add_feed.dart b/packages/neon/neon_news/lib/dialogs/add_feed.dart index bfc2c036..9e19669a 100644 --- a/packages/neon/neon_news/lib/dialogs/add_feed.dart +++ b/packages/neon/neon_news/lib/dialogs/add_feed.dart @@ -43,7 +43,7 @@ class _NewsAddFeedDialogState extends State { } @override - Widget build(final BuildContext context) => ResultBuilder>( + Widget build(final BuildContext context) => ResultBuilder>( stream: widget.bloc.folders, builder: (final context, final folders) => NeonDialog( title: Text(AppLocalizations.of(context).newsAddFeed), diff --git a/packages/neon/neon_news/lib/widgets/articles_view.dart b/packages/neon/neon_news/lib/widgets/articles_view.dart index 01a31bfc..30dc112f 100644 --- a/packages/neon/neon_news/lib/widgets/articles_view.dart +++ b/packages/neon/neon_news/lib/widgets/articles_view.dart @@ -25,9 +25,9 @@ class _NewsArticlesViewState extends State { } @override - Widget build(final BuildContext context) => ResultBuilder>( + Widget build(final BuildContext context) => ResultBuilder>( stream: widget.newsBloc.feeds, - builder: (final context, final feeds) => ResultBuilder>( + builder: (final context, final feeds) => ResultBuilder>( stream: widget.bloc.articles, builder: (final context, final articles) => Scaffold( resizeToAvoidBottomInset: false, diff --git a/packages/neon/neon_news/lib/widgets/feeds_view.dart b/packages/neon/neon_news/lib/widgets/feeds_view.dart index 20b1351c..be769ca2 100644 --- a/packages/neon/neon_news/lib/widgets/feeds_view.dart +++ b/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>( + Widget build(final BuildContext context) => ResultBuilder>( stream: bloc.folders, - builder: (final context, final folders) => ResultBuilder>( + builder: (final context, final folders) => ResultBuilder>( stream: bloc.feeds, builder: (final context, final feeds) => Scaffold( resizeToAvoidBottomInset: false, diff --git a/packages/neon/neon_news/lib/widgets/folders_view.dart b/packages/neon/neon_news/lib/widgets/folders_view.dart index 8e40ee26..82f110ca 100644 --- a/packages/neon/neon_news/lib/widgets/folders_view.dart +++ b/packages/neon/neon_news/lib/widgets/folders_view.dart @@ -23,9 +23,9 @@ class NewsFoldersView extends StatelessWidget { }, child: const Icon(Icons.add), ), - body: ResultBuilder>( + body: ResultBuilder>( stream: bloc.folders, - builder: (final context, final folders) => ResultBuilder>( + builder: (final context, final folders) => ResultBuilder>( stream: bloc.feeds, builder: (final context, final feeds) => SortBoxBuilder( sortBox: foldersSortBox, diff --git a/packages/neon/neon_notes/lib/dialogs/create_note.dart b/packages/neon/neon_notes/lib/dialogs/create_note.dart index 1c1d853a..3725f069 100644 --- a/packages/neon/neon_notes/lib/dialogs/create_note.dart +++ b/packages/neon/neon_notes/lib/dialogs/create_note.dart @@ -26,7 +26,7 @@ class _NotesCreateNoteDialogState extends State { } @override - Widget build(final BuildContext context) => ResultBuilder>( + Widget build(final BuildContext context) => ResultBuilder>( stream: widget.bloc.notes, builder: (final context, final notes) => NeonDialog( title: Text(AppLocalizations.of(context).notesCreateNote), diff --git a/packages/neon/neon_notes/lib/dialogs/select_category.dart b/packages/neon/neon_notes/lib/dialogs/select_category.dart index d482bee3..8880ce8c 100644 --- a/packages/neon/neon_notes/lib/dialogs/select_category.dart +++ b/packages/neon/neon_notes/lib/dialogs/select_category.dart @@ -26,7 +26,7 @@ class _NotesSelectCategoryDialogState extends State { } @override - Widget build(final BuildContext context) => ResultBuilder>( + Widget build(final BuildContext context) => ResultBuilder>( stream: widget.bloc.notes, builder: (final context, final notes) => NeonDialog( title: Text(AppLocalizations.of(context).notesChangeCategory), diff --git a/packages/neon/neon_notes/lib/widgets/categories_view.dart b/packages/neon/neon_notes/lib/widgets/categories_view.dart index be1435ff..2ca5f1f0 100644 --- a/packages/neon/neon_notes/lib/widgets/categories_view.dart +++ b/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>( + Widget build(final BuildContext context) => ResultBuilder>( stream: bloc.notes, builder: (final context, final notes) => SortBoxBuilder( sortBox: categoriesSortBox, diff --git a/packages/neon/neon_notes/lib/widgets/notes_view.dart b/packages/neon/neon_notes/lib/widgets/notes_view.dart index cfc5e7e7..f3e204c2 100644 --- a/packages/neon/neon_notes/lib/widgets/notes_view.dart +++ b/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>( + Widget build(final BuildContext context) => ResultBuilder>( stream: bloc.notes, builder: (final context, final notes) => Scaffold( resizeToAvoidBottomInset: false, diff --git a/packages/neon/neon_notifications/lib/pages/main.dart b/packages/neon/neon_notifications/lib/pages/main.dart index 61a8ab73..8ec1eddd 100644 --- a/packages/neon/neon_notifications/lib/pages/main.dart +++ b/packages/neon/neon_notifications/lib/pages/main.dart @@ -23,8 +23,7 @@ class _NotificationsMainPageState extends State { } @override - Widget build(final BuildContext context) => - ResultBuilder>( + Widget build(final BuildContext context) => ResultBuilder>( stream: widget.bloc.notifications, builder: (final context, final notifications) => Scaffold( resizeToAvoidBottomInset: false,