diff --git a/packages/neon/neon/lib/src/pages/home.dart b/packages/neon/neon/lib/src/pages/home.dart index 68d9916b..ede90702 100644 --- a/packages/neon/neon/lib/src/pages/home.dart +++ b/packages/neon/neon/lib/src/pages/home.dart @@ -150,7 +150,7 @@ class _HomePageState extends State { ], ), ), - body: app.buildPage(context, _appsBloc), + body: app.page, ), ), ); @@ -526,9 +526,7 @@ class _HomePageState extends State { ] else ...[ if (activeAppIDSnapshot.hasData) ...[ Expanded( - child: appImplementations.data! - .find(activeAppIDSnapshot.data!)! - .buildPage(context, _appsBloc), + child: appImplementations.data!.find(activeAppIDSnapshot.data!)!.page, ), ], ], diff --git a/packages/neon/neon/lib/src/utils/app_implementation.dart b/packages/neon/neon/lib/src/utils/app_implementation.dart index d04279f9..61a75194 100644 --- a/packages/neon/neon/lib/src/utils/app_implementation.dart +++ b/packages/neon/neon/lib/src/utils/app_implementation.dart @@ -30,7 +30,7 @@ abstract class AppImplementation? getUnreadCounter(final AppsBloc appsBloc); - Widget buildPage(final BuildContext context, final AppsBloc appsBloc); + Widget get page; Widget buildIcon( final BuildContext context, { diff --git a/packages/neon/neon_files/lib/neon_files.dart b/packages/neon/neon_files/lib/neon_files.dart index b5e5abb4..66a5c320 100644 --- a/packages/neon/neon_files/lib/neon_files.dart +++ b/packages/neon/neon_files/lib/neon_files.dart @@ -62,7 +62,7 @@ class FilesApp extends AppImplementation { ); @override - Widget buildPage(final BuildContext context, final AppsBloc appsBloc) => const FilesMainPage(); + Widget get page => const FilesMainPage(); @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 8964428b..030a11fc 100644 --- a/packages/neon/neon_news/lib/neon_news.dart +++ b/packages/neon/neon_news/lib/neon_news.dart @@ -68,7 +68,7 @@ class NewsApp extends AppImplementation { ); @override - Widget buildPage(final BuildContext context, final AppsBloc appsBloc) => const NewsMainPage(); + Widget get page => const NewsMainPage(); @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 e62d42a3..c3bf0383 100644 --- a/packages/neon/neon_notes/lib/neon_notes.dart +++ b/packages/neon/neon_notes/lib/neon_notes.dart @@ -58,7 +58,7 @@ class NotesApp extends AppImplementation { ); @override - Widget buildPage(final BuildContext context, final AppsBloc appsBloc) => const NotesMainPage(); + Widget get page => const NotesMainPage(); @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 02797eda..f5a9b61f 100644 --- a/packages/neon/neon_notifications/lib/neon_notifications.dart +++ b/packages/neon/neon_notifications/lib/neon_notifications.dart @@ -37,7 +37,7 @@ class NotificationsApp extends NotificationsAppInterface { ); @override - Widget buildPage(final BuildContext context, final AppsBloc appsBloc) => const NotificationsMainPage(); + Widget get page => const NotificationsMainPage(); @override BehaviorSubject getUnreadCounter(final AppsBloc appsBloc) =>