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();
@override
String id = AppIDs.files;
final String id = AppIDs.files;
@override
LocalizationsDelegate localizationsDelegate = AppLocalizations.delegate;
final LocalizationsDelegate localizationsDelegate = AppLocalizations.delegate;
@override
List<Locale> supportedLocales = AppLocalizations.supportedLocales;
final List<Locale> supportedLocales = AppLocalizations.supportedLocales;
@override
late final FilesAppSpecificOptions options = FilesAppSpecificOptions(storage);
@ -65,8 +65,8 @@ class FilesApp extends AppImplementation<FilesBloc, FilesAppSpecificOptions> {
);
@override
Widget get page => const FilesMainPage();
final Widget page = const FilesMainPage();
@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();
@override
String id = AppIDs.news;
final String id = AppIDs.news;
@override
LocalizationsDelegate localizationsDelegate = AppLocalizations.delegate;
final LocalizationsDelegate localizationsDelegate = AppLocalizations.delegate;
@override
List<Locale> supportedLocales = AppLocalizations.supportedLocales;
final List<Locale> supportedLocales = AppLocalizations.supportedLocales;
@override
late final NewsAppSpecificOptions options = NewsAppSpecificOptions(storage);
@ -73,10 +73,10 @@ class NewsApp extends AppImplementation<NewsBloc, NewsAppSpecificOptions> {
);
@override
Widget get page => const NewsMainPage();
final Widget page = const NewsMainPage();
@override
RouteBase get route => $newsAppRoute;
final RouteBase route = $newsAppRoute;
@override
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();
@override
String id = AppIDs.notes;
final String id = AppIDs.notes;
@override
List<Locale> supportedLocales = AppLocalizations.supportedLocales;
final List<Locale> supportedLocales = AppLocalizations.supportedLocales;
@override
LocalizationsDelegate localizationsDelegate = AppLocalizations.delegate;
final LocalizationsDelegate localizationsDelegate = AppLocalizations.delegate;
@override
late final NotesAppSpecificOptions options = NotesAppSpecificOptions(storage);
@ -63,8 +63,8 @@ class NotesApp extends AppImplementation<NotesBloc, NotesAppSpecificOptions> {
);
@override
Widget get page => const NotesMainPage();
final Widget page = const NotesMainPage();
@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();
@override
String id = AppIDs.notifications;
final String id = AppIDs.notifications;
@override
LocalizationsDelegate localizationsDelegate = AppLocalizations.delegate;
final LocalizationsDelegate localizationsDelegate = AppLocalizations.delegate;
@override
List<Locale> supportedLocales = AppLocalizations.supportedLocales;
final List<Locale> supportedLocales = AppLocalizations.supportedLocales;
@override
late final NotificationsAppSpecificOptions options = NotificationsAppSpecificOptions(storage);
@ -43,10 +43,10 @@ class NotificationsApp extends AppImplementation<NotificationsBloc, Notification
);
@override
Widget get page => const NotificationsMainPage();
final Widget page = const NotificationsMainPage();
@override
RouteBase get route => $notificationsAppRoute;
final RouteBase route = $notificationsAppRoute;
@override
BehaviorSubject<int> getUnreadCounter(final NotificationsBloc bloc) => bloc.unreadCounter;

Loading…
Cancel
Save