From d1fb1f8d661472d234c2c0c6023a842166d42da5 Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Fri, 29 Sep 2023 14:18:40 +0200 Subject: [PATCH] refactor(neon,neon_news,neon_notes): make InteractiveBloc.refresh FutureOr Signed-off-by: Nikolas Rimikis --- packages/neon/neon/lib/src/bloc/bloc.dart | 2 +- packages/neon/neon_news/lib/blocs/article.dart | 2 +- packages/neon/neon_notes/lib/blocs/note.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/neon/neon/lib/src/bloc/bloc.dart b/packages/neon/neon/lib/src/bloc/bloc.dart index be6582f5..d3b94912 100644 --- a/packages/neon/neon/lib/src/bloc/bloc.dart +++ b/packages/neon/neon/lib/src/bloc/bloc.dart @@ -19,7 +19,7 @@ abstract class InteractiveBloc extends Bloc { final _errorsStreamController = StreamController(); late Stream errors = _errorsStreamController.stream.asBroadcastStream(); - Future refresh(); + FutureOr refresh(); void addError(final Object error) { _errorsStreamController.add(error); diff --git a/packages/neon/neon_news/lib/blocs/article.dart b/packages/neon/neon_news/lib/blocs/article.dart index 7ccc7aed..3fdf5d19 100644 --- a/packages/neon/neon_news/lib/blocs/article.dart +++ b/packages/neon/neon_news/lib/blocs/article.dart @@ -44,7 +44,7 @@ class NewsArticleBloc extends InteractiveBloc implements NewsArticleBlocEvents, BehaviorSubject unread = BehaviorSubject(); @override - Future refresh() async {} + void refresh() {} @override void markArticleAsRead() { diff --git a/packages/neon/neon_notes/lib/blocs/note.dart b/packages/neon/neon_notes/lib/blocs/note.dart index 02e8b9aa..d090e4c7 100644 --- a/packages/neon/neon_notes/lib/blocs/note.dart +++ b/packages/neon/neon_notes/lib/blocs/note.dart @@ -62,7 +62,7 @@ class NotesNoteBloc extends InteractiveBloc implements NotesNoteBlocEvents, Note BehaviorSubject category = BehaviorSubject(); @override - Future refresh() async {} + void refresh() {} @override void updateCategory(final String category) {