diff --git a/packages/neon/neon_files/lib/neon_files.dart b/packages/neon/neon_files/lib/neon_files.dart index 88ab2f7a..a0ef69ce 100644 --- a/packages/neon/neon_files/lib/neon_files.dart +++ b/packages/neon/neon_files/lib/neon_files.dart @@ -62,9 +62,13 @@ class FilesApp extends AppImplementation { ); @override - Widget buildPage(final BuildContext context, final AppsBloc appsBloc) => FilesMainPage( - bloc: appsBloc.getAppBloc(this), - ); + Widget buildPage(final BuildContext context, final AppsBloc appsBloc) { + final bloc = Provider.of(context, listen: false); + + return FilesMainPage( + bloc: bloc, + ); + } @override BehaviorSubject? getUnreadCounter(final AppsBloc appsBloc) => null; diff --git a/packages/neon/neon_news/lib/neon_news.dart b/packages/neon/neon_news/lib/neon_news.dart index d9d239d2..6ee7237c 100644 --- a/packages/neon/neon_news/lib/neon_news.dart +++ b/packages/neon/neon_news/lib/neon_news.dart @@ -68,9 +68,13 @@ class NewsApp extends AppImplementation { ); @override - Widget buildPage(final BuildContext context, final AppsBloc appsBloc) => NewsMainPage( - bloc: appsBloc.getAppBloc(this), - ); + Widget buildPage(final BuildContext context, final AppsBloc appsBloc) { + final bloc = Provider.of(context, listen: false); + + return NewsMainPage( + bloc: bloc, + ); + } @override BehaviorSubject getUnreadCounter(final AppsBloc appsBloc) => appsBloc.getAppBloc(this).unreadCounter; diff --git a/packages/neon/neon_notes/lib/neon_notes.dart b/packages/neon/neon_notes/lib/neon_notes.dart index 65bb522e..2989bbc9 100644 --- a/packages/neon/neon_notes/lib/neon_notes.dart +++ b/packages/neon/neon_notes/lib/neon_notes.dart @@ -58,9 +58,13 @@ class NotesApp extends AppImplementation { ); @override - Widget buildPage(final BuildContext context, final AppsBloc appsBloc) => NotesMainPage( - bloc: appsBloc.getAppBloc(this), - ); + Widget buildPage(final BuildContext context, final AppsBloc appsBloc) { + final bloc = Provider.of(context, listen: false); + + return NotesMainPage( + bloc: bloc, + ); + } @override BehaviorSubject? getUnreadCounter(final AppsBloc appsBloc) => null; diff --git a/packages/neon/neon_notifications/lib/neon_notifications.dart b/packages/neon/neon_notifications/lib/neon_notifications.dart index 976804c4..45909d57 100644 --- a/packages/neon/neon_notifications/lib/neon_notifications.dart +++ b/packages/neon/neon_notifications/lib/neon_notifications.dart @@ -37,9 +37,13 @@ class NotificationsApp extends NotificationsAppInterface { ); @override - Widget buildPage(final BuildContext context, final AppsBloc appsBloc) => NotificationsMainPage( - bloc: appsBloc.getAppBloc(this), - ); + Widget buildPage(final BuildContext context, final AppsBloc appsBloc) { + final bloc = Provider.of(context, listen: false); + + return NotificationsMainPage( + bloc: bloc, + ); + } @override BehaviorSubject getUnreadCounter(final AppsBloc appsBloc) =>