Browse Source

refactor(neon_files,neon_news,neon_notes,neon_notifications): make concrete AppImplementations immutable

Signed-off-by: Nikolas Rimikis <rimikis.nikolas@gmail.com>
pull/654/head
Nikolas Rimikis 1 year ago
parent
commit
26676dc1c7
No known key found for this signature in database
GPG Key ID: 85ED1DE9786A4FF2
  1. 10
      packages/neon/neon_files/lib/neon_files.dart
  2. 10
      packages/neon/neon_news/lib/neon_news.dart
  3. 10
      packages/neon/neon_notes/lib/neon_notes.dart
  4. 10
      packages/neon/neon_notifications/lib/neon_notifications.dart

10
packages/neon/neon_files/lib/neon_files.dart

@ -47,13 +47,13 @@ class FilesApp extends AppImplementation<FilesBloc, FilesAppSpecificOptions> {
FilesApp(); FilesApp();
@override @override
String id = AppIDs.files; final String id = AppIDs.files;
@override @override
LocalizationsDelegate localizationsDelegate = AppLocalizations.delegate; final LocalizationsDelegate localizationsDelegate = AppLocalizations.delegate;
@override @override
List<Locale> supportedLocales = AppLocalizations.supportedLocales; final List<Locale> supportedLocales = AppLocalizations.supportedLocales;
@override @override
late final FilesAppSpecificOptions options = FilesAppSpecificOptions(storage); late final FilesAppSpecificOptions options = FilesAppSpecificOptions(storage);
@ -65,8 +65,8 @@ class FilesApp extends AppImplementation<FilesBloc, FilesAppSpecificOptions> {
); );
@override @override
Widget get page => const FilesMainPage(); final Widget page = const FilesMainPage();
@override @override
RouteBase get route => $filesAppRoute; final RouteBase route = $filesAppRoute;
} }

10
packages/neon/neon_news/lib/neon_news.dart

@ -55,13 +55,13 @@ class NewsApp extends AppImplementation<NewsBloc, NewsAppSpecificOptions> {
NewsApp(); NewsApp();
@override @override
String id = AppIDs.news; final String id = AppIDs.news;
@override @override
LocalizationsDelegate localizationsDelegate = AppLocalizations.delegate; final LocalizationsDelegate localizationsDelegate = AppLocalizations.delegate;
@override @override
List<Locale> supportedLocales = AppLocalizations.supportedLocales; final List<Locale> supportedLocales = AppLocalizations.supportedLocales;
@override @override
late final NewsAppSpecificOptions options = NewsAppSpecificOptions(storage); late final NewsAppSpecificOptions options = NewsAppSpecificOptions(storage);
@ -73,10 +73,10 @@ class NewsApp extends AppImplementation<NewsBloc, NewsAppSpecificOptions> {
); );
@override @override
Widget get page => const NewsMainPage(); final Widget page = const NewsMainPage();
@override @override
RouteBase get route => $newsAppRoute; final RouteBase route = $newsAppRoute;
@override @override
BehaviorSubject<int> getUnreadCounter(final NewsBloc bloc) => bloc.unreadCounter; BehaviorSubject<int> getUnreadCounter(final NewsBloc bloc) => bloc.unreadCounter;

10
packages/neon/neon_notes/lib/neon_notes.dart

@ -45,13 +45,13 @@ class NotesApp extends AppImplementation<NotesBloc, NotesAppSpecificOptions> {
NotesApp(); NotesApp();
@override @override
String id = AppIDs.notes; final String id = AppIDs.notes;
@override @override
List<Locale> supportedLocales = AppLocalizations.supportedLocales; final List<Locale> supportedLocales = AppLocalizations.supportedLocales;
@override @override
LocalizationsDelegate localizationsDelegate = AppLocalizations.delegate; final LocalizationsDelegate localizationsDelegate = AppLocalizations.delegate;
@override @override
late final NotesAppSpecificOptions options = NotesAppSpecificOptions(storage); late final NotesAppSpecificOptions options = NotesAppSpecificOptions(storage);
@ -63,8 +63,8 @@ class NotesApp extends AppImplementation<NotesBloc, NotesAppSpecificOptions> {
); );
@override @override
Widget get page => const NotesMainPage(); final Widget page = const NotesMainPage();
@override @override
RouteBase get route => $notesAppRoute; final RouteBase route = $notesAppRoute;
} }

10
packages/neon/neon_notifications/lib/neon_notifications.dart

@ -25,13 +25,13 @@ class NotificationsApp extends AppImplementation<NotificationsBloc, Notification
NotificationsApp(); NotificationsApp();
@override @override
String id = AppIDs.notifications; final String id = AppIDs.notifications;
@override @override
LocalizationsDelegate localizationsDelegate = AppLocalizations.delegate; final LocalizationsDelegate localizationsDelegate = AppLocalizations.delegate;
@override @override
List<Locale> supportedLocales = AppLocalizations.supportedLocales; final List<Locale> supportedLocales = AppLocalizations.supportedLocales;
@override @override
late final NotificationsAppSpecificOptions options = NotificationsAppSpecificOptions(storage); late final NotificationsAppSpecificOptions options = NotificationsAppSpecificOptions(storage);
@ -43,10 +43,10 @@ class NotificationsApp extends AppImplementation<NotificationsBloc, Notification
); );
@override @override
Widget get page => const NotificationsMainPage(); final Widget page = const NotificationsMainPage();
@override @override
RouteBase get route => $notificationsAppRoute; final RouteBase route = $notificationsAppRoute;
@override @override
BehaviorSubject<int> getUnreadCounter(final NotificationsBloc bloc) => bloc.unreadCounter; BehaviorSubject<int> getUnreadCounter(final NotificationsBloc bloc) => bloc.unreadCounter;

Loading…
Cancel
Save