diff --git a/packages/neon/lib/src/apps/files/blocs/files.rxb.g.dart b/packages/neon/lib/src/apps/files/blocs/files.rxb.g.dart index f3687cd5..3cede1bf 100644 --- a/packages/neon/lib/src/apps/files/blocs/files.rxb.g.dart +++ b/packages/neon/lib/src/apps/files/blocs/files.rxb.g.dart @@ -61,26 +61,62 @@ abstract class $FilesBloc extends RxBlocBase implements FilesBlocEvents, FilesBl void refresh() => _$refreshEvent.add(null); @override - void uploadFile(List path, String localPath) => _$uploadFileEvent.add(_UploadFileEventArgs(path, localPath)); + void uploadFile( + List path, + String localPath, + ) => + _$uploadFileEvent.add(_UploadFileEventArgs( + path, + localPath, + )); @override void syncFile(List path) => _$syncFileEvent.add(path); @override - void openFile(List path, String etag, String? mimeType) => - _$openFileEvent.add(_OpenFileEventArgs(path, etag, mimeType)); + void openFile( + List path, + String etag, + String? mimeType, + ) => + _$openFileEvent.add(_OpenFileEventArgs( + path, + etag, + mimeType, + )); @override void delete(List path) => _$deleteEvent.add(path); @override - void rename(List path, String name) => _$renameEvent.add(_RenameEventArgs(path, name)); + void rename( + List path, + String name, + ) => + _$renameEvent.add(_RenameEventArgs( + path, + name, + )); @override - void move(List path, List destination) => _$moveEvent.add(_MoveEventArgs(path, destination)); + void move( + List path, + List destination, + ) => + _$moveEvent.add(_MoveEventArgs( + path, + destination, + )); @override - void copy(List path, List destination) => _$copyEvent.add(_CopyEventArgs(path, destination)); + void copy( + List path, + List destination, + ) => + _$copyEvent.add(_CopyEventArgs( + path, + destination, + )); @override void addFavorite(List path) => _$addFavoriteEvent.add(path); @@ -129,7 +165,10 @@ abstract class $FilesBloc extends RxBlocBase implements FilesBlocEvents, FilesBl /// Helps providing the arguments in the [Subject.add] for /// [FilesBlocEvents.uploadFile] event class _UploadFileEventArgs { - const _UploadFileEventArgs(this.path, this.localPath); + const _UploadFileEventArgs( + this.path, + this.localPath, + ); final List path; @@ -139,7 +178,11 @@ class _UploadFileEventArgs { /// Helps providing the arguments in the [Subject.add] for /// [FilesBlocEvents.openFile] event class _OpenFileEventArgs { - const _OpenFileEventArgs(this.path, this.etag, this.mimeType); + const _OpenFileEventArgs( + this.path, + this.etag, + this.mimeType, + ); final List path; @@ -151,7 +194,10 @@ class _OpenFileEventArgs { /// Helps providing the arguments in the [Subject.add] for /// [FilesBlocEvents.rename] event class _RenameEventArgs { - const _RenameEventArgs(this.path, this.name); + const _RenameEventArgs( + this.path, + this.name, + ); final List path; @@ -161,7 +207,10 @@ class _RenameEventArgs { /// Helps providing the arguments in the [Subject.add] for /// [FilesBlocEvents.move] event class _MoveEventArgs { - const _MoveEventArgs(this.path, this.destination); + const _MoveEventArgs( + this.path, + this.destination, + ); final List path; @@ -171,7 +220,10 @@ class _MoveEventArgs { /// Helps providing the arguments in the [Subject.add] for /// [FilesBlocEvents.copy] event class _CopyEventArgs { - const _CopyEventArgs(this.path, this.destination); + const _CopyEventArgs( + this.path, + this.destination, + ); final List path; diff --git a/packages/neon/lib/src/apps/news/blocs/news.rxb.g.dart b/packages/neon/lib/src/apps/news/blocs/news.rxb.g.dart index f7ef4769..7951f5f1 100644 --- a/packages/neon/lib/src/apps/news/blocs/news.rxb.g.dart +++ b/packages/neon/lib/src/apps/news/blocs/news.rxb.g.dart @@ -64,16 +64,37 @@ abstract class $NewsBloc extends RxBlocBase implements NewsBlocEvents, NewsBlocS void refresh({required bool mainArticlesToo}) => _$refreshEvent.add(mainArticlesToo); @override - void addFeed(String url, int? folderId) => _$addFeedEvent.add(_AddFeedEventArgs(url, folderId)); + void addFeed( + String url, + int? folderId, + ) => + _$addFeedEvent.add(_AddFeedEventArgs( + url, + folderId, + )); @override void removeFeed(int feedId) => _$removeFeedEvent.add(feedId); @override - void renameFeed(int feedId, String feedTitle) => _$renameFeedEvent.add(_RenameFeedEventArgs(feedId, feedTitle)); + void renameFeed( + int feedId, + String feedTitle, + ) => + _$renameFeedEvent.add(_RenameFeedEventArgs( + feedId, + feedTitle, + )); @override - void moveFeed(int feedId, int? folderId) => _$moveFeedEvent.add(_MoveFeedEventArgs(feedId, folderId)); + void moveFeed( + int feedId, + int? folderId, + ) => + _$moveFeedEvent.add(_MoveFeedEventArgs( + feedId, + folderId, + )); @override void markFeedAsRead(int feedId) => _$markFeedAsReadEvent.add(feedId); @@ -85,7 +106,14 @@ abstract class $NewsBloc extends RxBlocBase implements NewsBlocEvents, NewsBlocS void deleteFolder(int folderId) => _$deleteFolderEvent.add(folderId); @override - void renameFolder(int folderId, String name) => _$renameFolderEvent.add(_RenameFolderEventArgs(folderId, name)); + void renameFolder( + int folderId, + String name, + ) => + _$renameFolderEvent.add(_RenameFolderEventArgs( + folderId, + name, + )); @override void markFolderAsRead(int folderId) => _$markFolderAsReadEvent.add(folderId); @@ -136,7 +164,10 @@ abstract class $NewsBloc extends RxBlocBase implements NewsBlocEvents, NewsBlocS /// Helps providing the arguments in the [Subject.add] for /// [NewsBlocEvents.addFeed] event class _AddFeedEventArgs { - const _AddFeedEventArgs(this.url, this.folderId); + const _AddFeedEventArgs( + this.url, + this.folderId, + ); final String url; @@ -146,7 +177,10 @@ class _AddFeedEventArgs { /// Helps providing the arguments in the [Subject.add] for /// [NewsBlocEvents.renameFeed] event class _RenameFeedEventArgs { - const _RenameFeedEventArgs(this.feedId, this.feedTitle); + const _RenameFeedEventArgs( + this.feedId, + this.feedTitle, + ); final int feedId; @@ -156,7 +190,10 @@ class _RenameFeedEventArgs { /// Helps providing the arguments in the [Subject.add] for /// [NewsBlocEvents.moveFeed] event class _MoveFeedEventArgs { - const _MoveFeedEventArgs(this.feedId, this.folderId); + const _MoveFeedEventArgs( + this.feedId, + this.folderId, + ); final int feedId; @@ -166,7 +203,10 @@ class _MoveFeedEventArgs { /// Helps providing the arguments in the [Subject.add] for /// [NewsBlocEvents.renameFolder] event class _RenameFolderEventArgs { - const _RenameFolderEventArgs(this.folderId, this.name); + const _RenameFolderEventArgs( + this.folderId, + this.name, + ); final int folderId; diff --git a/packages/neon/lib/src/apps/notes/blocs/notes.rxb.g.dart b/packages/neon/lib/src/apps/notes/blocs/notes.rxb.g.dart index 83e8a5f4..278dae37 100644 --- a/packages/neon/lib/src/apps/notes/blocs/notes.rxb.g.dart +++ b/packages/neon/lib/src/apps/notes/blocs/notes.rxb.g.dart @@ -43,13 +43,32 @@ abstract class $NotesBloc extends RxBlocBase implements NotesBlocEvents, NotesBl void refresh() => _$refreshEvent.add(null); @override - void createNote({String title = '', String category = ''}) => - _$createNoteEvent.add(_CreateNoteEventArgs(title: title, category: category)); + void createNote({ + String title = '', + String category = '', + }) => + _$createNoteEvent.add(_CreateNoteEventArgs( + title: title, + category: category, + )); @override - void updateNote(int id, String etag, {String? title, String? category, String? content, bool? favorite}) => - _$updateNoteEvent - .add(_UpdateNoteEventArgs(id, etag, title: title, category: category, content: content, favorite: favorite)); + void updateNote( + int id, + String etag, { + String? title, + String? category, + String? content, + bool? favorite, + }) => + _$updateNoteEvent.add(_UpdateNoteEventArgs( + id, + etag, + title: title, + category: category, + content: content, + favorite: favorite, + )); @override void deleteNote(int id) => _$deleteNoteEvent.add(id); @@ -89,7 +108,10 @@ abstract class $NotesBloc extends RxBlocBase implements NotesBlocEvents, NotesBl /// Helps providing the arguments in the [Subject.add] for /// [NotesBlocEvents.createNote] event class _CreateNoteEventArgs { - const _CreateNoteEventArgs({this.title = '', this.category = ''}); + const _CreateNoteEventArgs({ + this.title = '', + this.category = '', + }); final String title; @@ -99,7 +121,14 @@ class _CreateNoteEventArgs { /// Helps providing the arguments in the [Subject.add] for /// [NotesBlocEvents.updateNote] event class _UpdateNoteEventArgs { - const _UpdateNoteEventArgs(this.id, this.etag, {this.title, this.category, this.content, this.favorite}); + const _UpdateNoteEventArgs( + this.id, + this.etag, { + this.title, + this.category, + this.content, + this.favorite, + }); final int id; diff --git a/packages/neon/lib/src/pages/home/home.dart b/packages/neon/lib/src/pages/home/home.dart index e081b470..b062e2d1 100644 --- a/packages/neon/lib/src/pages/home/home.dart +++ b/packages/neon/lib/src/pages/home/home.dart @@ -189,7 +189,7 @@ class _HomePageState extends State with tray.TrayListener, WindowListe final details = await localNotificationsPlugin.getNotificationAppLaunchDetails(); if (details != null && details.didNotificationLaunchApp) { - await Global.onPushNotificationClicked!(details.payload); + await Global.onPushNotificationClicked!(details.notificationResponse?.payload); } } }); diff --git a/packages/neon/lib/src/utils/push_utils.dart b/packages/neon/lib/src/utils/push_utils.dart index b187023a..e51aba22 100644 --- a/packages/neon/lib/src/utils/push_utils.dart +++ b/packages/neon/lib/src/utils/push_utils.dart @@ -19,7 +19,7 @@ class PushUtils { } static Future initLocalNotifications({ - final SelectNotificationCallback? onSelectNotification, + final DidReceiveNotificationResponseCallback? onDidReceiveNotificationResponse, }) async { final localNotificationsPlugin = FlutterLocalNotificationsPlugin(); await localNotificationsPlugin.initialize( @@ -30,7 +30,7 @@ class PushUtils { defaultIcon: AssetsLinuxIcon('assets/logo_harbour.svg'), ), ), - onSelectNotification: onSelectNotification, + onDidReceiveNotificationResponse: onDidReceiveNotificationResponse, ); return localNotificationsPlugin; } @@ -39,9 +39,9 @@ class PushUtils { WidgetsFlutterBinding.ensureInitialized(); final localNotificationsPlugin = await initLocalNotifications( - onSelectNotification: (final payload) async { + onDidReceiveNotificationResponse: (final notification) async { if (Global.onPushNotificationClicked != null) { - await Global.onPushNotificationClicked!(payload); + await Global.onPushNotificationClicked!(notification.payload); } }, ); @@ -101,7 +101,7 @@ class PushUtils { groupKey: 'app_${app.id}', icon: '@mipmap/app_${app.id}', color: themePrimaryColor, - category: notification.type == 'voip' ? 'CATEGORY_CALL' : null, + category: notification.type == 'voip' ? AndroidNotificationCategory.call : null, importance: Importance.max, priority: notification.priority == 'high' ? (notification.type == 'voip' ? Priority.max : Priority.high) diff --git a/packages/neon/pubspec.lock b/packages/neon/pubspec.lock index d9d900f5..bd76ca16 100644 --- a/packages/neon/pubspec.lock +++ b/packages/neon/pubspec.lock @@ -7,14 +7,14 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "46.0.0" + version: "47.0.0" analyzer: - dependency: transitive + dependency: "direct overridden" description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "4.6.0" + version: "4.7.0" archive: dependency: transitive description: @@ -35,7 +35,7 @@ packages: name: asn1lib url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.1.1" async: dependency: transitive description: @@ -56,7 +56,7 @@ packages: name: build url: "https://pub.dartlang.org" source: hosted - version: "2.3.0" + version: "2.3.1" build_config: dependency: transitive description: @@ -77,21 +77,21 @@ packages: name: build_resolvers url: "https://pub.dartlang.org" source: hosted - version: "2.0.9" + version: "2.0.10" build_runner: dependency: "direct dev" description: name: build_runner url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.2.1" build_runner_core: dependency: transitive description: name: build_runner_core url: "https://pub.dartlang.org" source: hosted - version: "7.2.3" + version: "7.2.4" built_collection: dependency: transitive description: @@ -113,13 +113,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.2.1" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" checked_yaml: dependency: transitive description: @@ -140,7 +133,7 @@ packages: name: code_builder url: "https://pub.dartlang.org" source: hosted - version: "4.2.0" + version: "4.3.0" collection: dependency: "direct main" description: @@ -161,7 +154,7 @@ packages: name: cross_file url: "https://pub.dartlang.org" source: hosted - version: "0.3.3+1" + version: "0.3.3+2" crypto: dependency: "direct main" description: @@ -189,7 +182,7 @@ packages: name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "2.2.3" + version: "2.2.4" dbus: dependency: transitive description: @@ -269,7 +262,7 @@ packages: name: flutter_file_dialog url: "https://pub.dartlang.org" source: hosted - version: "2.3.1" + version: "2.3.2" flutter_html: dependency: "direct main" description: @@ -283,21 +276,21 @@ packages: name: flutter_local_notifications url: "https://pub.dartlang.org" source: hosted - version: "9.9.0" + version: "11.0.1" flutter_local_notifications_linux: dependency: transitive description: name: flutter_local_notifications_linux url: "https://pub.dartlang.org" source: hosted - version: "0.5.1" + version: "1.0.0" flutter_local_notifications_platform_interface: dependency: transitive description: name: flutter_local_notifications_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "5.0.0" + version: "6.0.0" flutter_localizations: dependency: "direct main" description: flutter @@ -309,14 +302,14 @@ packages: name: flutter_markdown url: "https://pub.dartlang.org" source: hosted - version: "0.6.10+5" + version: "0.6.12" flutter_native_splash: dependency: "direct main" description: name: flutter_native_splash url: "https://pub.dartlang.org" source: hosted - version: "2.2.8" + version: "2.2.9" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -337,7 +330,7 @@ packages: name: flutter_svg url: "https://pub.dartlang.org" source: hosted - version: "1.1.4" + version: "1.1.5" flutter_test: dependency: "direct dev" description: flutter @@ -422,7 +415,7 @@ packages: name: image_picker_android url: "https://pub.dartlang.org" source: hosted - version: "0.8.5+2" + version: "0.8.5+3" image_picker_for_web: dependency: transitive description: @@ -436,7 +429,7 @@ packages: name: image_picker_ios url: "https://pub.dartlang.org" source: hosted - version: "0.8.5+6" + version: "0.8.6+1" image_picker_platform_interface: dependency: transitive description: @@ -483,14 +476,14 @@ packages: name: json_annotation url: "https://pub.dartlang.org" source: hosted - version: "4.6.0" + version: "4.7.0" json_serializable: dependency: "direct dev" description: name: json_serializable url: "https://pub.dartlang.org" source: hosted - version: "6.3.1" + version: "6.4.0" lint: dependency: transitive description: @@ -511,7 +504,7 @@ packages: name: markdown url: "https://pub.dartlang.org" source: hosted - version: "5.0.0" + version: "6.0.1" matcher: dependency: transitive description: @@ -716,7 +709,7 @@ packages: name: permission_handler url: "https://pub.dartlang.org" source: hosted - version: "10.0.0" + version: "10.0.1" permission_handler_android: dependency: transitive description: @@ -737,7 +730,7 @@ packages: name: permission_handler_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "3.7.0" + version: "3.7.1" permission_handler_windows: dependency: transitive description: @@ -765,14 +758,14 @@ packages: name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.1.2" + version: "2.1.3" pointycastle: dependency: transitive description: name: pointycastle url: "https://pub.dartlang.org" source: hosted - version: "3.6.1" + version: "3.6.2" pool: dependency: transitive description: @@ -821,7 +814,7 @@ packages: name: quick_actions url: "https://pub.dartlang.org" source: hosted - version: "0.6.0+11" + version: "1.0.0" quick_actions_android: dependency: transitive description: @@ -870,7 +863,7 @@ packages: name: screen_retriever url: "https://pub.dartlang.org" source: hosted - version: "0.1.2" + version: "0.1.3" settings: dependency: "direct main" description: @@ -884,7 +877,7 @@ packages: name: share_plus url: "https://pub.dartlang.org" source: hosted - version: "4.0.10+1" + version: "4.4.0" share_plus_linux: dependency: transitive description: @@ -933,7 +926,7 @@ packages: name: shared_preferences_android url: "https://pub.dartlang.org" source: hosted - version: "2.0.12" + version: "2.0.13" shared_preferences_ios: dependency: transitive description: @@ -982,7 +975,7 @@ packages: name: shelf url: "https://pub.dartlang.org" source: hosted - version: "1.3.2" + version: "1.4.0" shelf_web_socket: dependency: transitive description: @@ -1015,14 +1008,14 @@ packages: name: source_gen url: "https://pub.dartlang.org" source: hosted - version: "1.2.2" + version: "1.2.5" source_helper: dependency: transitive description: name: source_helper url: "https://pub.dartlang.org" source: hosted - version: "1.3.2" + version: "1.3.3" source_span: dependency: transitive description: @@ -1036,14 +1029,14 @@ packages: name: sqflite url: "https://pub.dartlang.org" source: hosted - version: "2.0.3+1" + version: "2.1.0" sqflite_common: dependency: transitive description: name: sqflite_common url: "https://pub.dartlang.org" source: hosted - version: "2.2.1+1" + version: "2.3.0" sqflite_common_ffi: dependency: "direct main" description: @@ -1057,7 +1050,7 @@ packages: name: sqlite3 url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.9.0" stack_trace: dependency: transitive description: @@ -1099,7 +1092,7 @@ packages: name: synchronized url: "https://pub.dartlang.org" source: hosted - version: "3.0.0+2" + version: "3.0.0+3" term_glyph: dependency: transitive description: @@ -1120,7 +1113,7 @@ packages: name: timezone url: "https://pub.dartlang.org" source: hosted - version: "0.8.0" + version: "0.9.0" timing: dependency: transitive description: @@ -1183,7 +1176,7 @@ packages: name: url_launcher_android url: "https://pub.dartlang.org" source: hosted - version: "6.0.17" + version: "6.0.19" url_launcher_ios: dependency: transitive description: @@ -1309,21 +1302,21 @@ packages: name: webview_flutter_android url: "https://pub.dartlang.org" source: hosted - version: "2.9.5" + version: "2.10.2" webview_flutter_platform_interface: dependency: transitive description: name: webview_flutter_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.9.2" + version: "1.9.3" webview_flutter_wkwebview: dependency: transitive description: name: webview_flutter_wkwebview url: "https://pub.dartlang.org" source: hosted - version: "2.9.3" + version: "2.9.4" win32: dependency: transitive description: diff --git a/packages/neon/pubspec.yaml b/packages/neon/pubspec.yaml index f3474aba..0f315033 100644 --- a/packages/neon/pubspec.yaml +++ b/packages/neon/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: flutter_dotenv: ^5.0.2 flutter_file_dialog: ^2.3.0 flutter_html: ^3.0.0-alpha.3 - flutter_local_notifications: ^9.7.0 + flutter_local_notifications: ^11.0.1 flutter_localizations: sdk: flutter flutter_markdown: ^0.6.10+2 @@ -30,7 +30,7 @@ dependencies: image_picker: ^0.8.5+3 intersperse: ^2.0.0 intl: ^0.17.0 - json_annotation: ^4.5.0 + json_annotation: ^4.7.0 material_design_icons_flutter: ^5.0.6595 nextcloud: path: ../nextcloud @@ -41,7 +41,7 @@ dependencies: permission_handler: ^10.0.0 provider: ^6.0.2 queue: ^3.1.0+1 - quick_actions: ^0.6.0+11 + quick_actions: ^1.0.0 rx_bloc: ^3.2.1 rxdart: ^0.27.3 settings: @@ -60,6 +60,9 @@ dependencies: window_manager: ^0.2.5 xdg_directories: ^0.2.0+1 +dependency_overrides: + analyzer: ^4.0.0 # 5.0.0 breaks rx_bloc_generator + dev_dependencies: build_runner: ^2.1.7 flutter_driver: