diff --git a/android/app/lint-baseline.xml b/android/app/lint-baseline.xml index be85415f4e..7f30c71e4e 100644 --- a/android/app/lint-baseline.xml +++ b/android/app/lint-baseline.xml @@ -1,12 +1,12 @@ - + + file="$GRADLE_USER_HOME/caches/modules-2/files-2.1/org.apache.tika/tika-core/3.2.3/4b1b82f8cce72c9bd3676532c8b613e24041d96c/tika-core-3.2.3.jar"/> diff --git a/android/app/src/main/kotlin/com/zulip/flutter/AndroidIntents.g.kt b/android/app/src/main/kotlin/com/zulip/flutter/AndroidIntents.g.kt index 627bd443e1..0beddf0d86 100644 --- a/android/app/src/main/kotlin/com/zulip/flutter/AndroidIntents.g.kt +++ b/android/app/src/main/kotlin/com/zulip/flutter/AndroidIntents.g.kt @@ -1,4 +1,4 @@ -// Autogenerated from Pigeon (v26.1.2), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") @@ -199,5 +199,9 @@ abstract class AndroidIntentEventsStreamHandler : AndroidIntentsPigeonEventChann EventChannel(messenger, channelName, AndroidIntentsPigeonMethodCodec).setStreamHandler(internalStreamHandler) } } +// Implement methods from AndroidIntentsPigeonEventChannelWrapper +override fun onListen(p0: Any?, sink: PigeonEventSink) {} + +override fun onCancel(p0: Any?) {} } diff --git a/android/app/src/main/kotlin/com/zulip/flutter/AndroidNotifications.g.kt b/android/app/src/main/kotlin/com/zulip/flutter/AndroidNotifications.g.kt index 7ca3adb5a2..b2e7b228c7 100644 --- a/android/app/src/main/kotlin/com/zulip/flutter/AndroidNotifications.g.kt +++ b/android/app/src/main/kotlin/com/zulip/flutter/AndroidNotifications.g.kt @@ -1,4 +1,4 @@ -// Autogenerated from Pigeon (v26.1.2), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") diff --git a/android/app/src/main/kotlin/com/zulip/flutter/notifications/Notifications.g.kt b/android/app/src/main/kotlin/com/zulip/flutter/notifications/Notifications.g.kt index 64a69b2eb9..cf13471e0c 100644 --- a/android/app/src/main/kotlin/com/zulip/flutter/notifications/Notifications.g.kt +++ b/android/app/src/main/kotlin/com/zulip/flutter/notifications/Notifications.g.kt @@ -1,4 +1,4 @@ -// Autogenerated from Pigeon (v26.1.2), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon @file:Suppress("UNCHECKED_CAST", "ArrayInDataClass") @@ -344,5 +344,9 @@ abstract class NotificationTapEventsStreamHandler : NotificationsPigeonEventChan EventChannel(messenger, channelName, NotificationsPigeonMethodCodec).setStreamHandler(internalStreamHandler) } } +// Implement methods from NotificationsPigeonEventChannelWrapper +override fun onListen(p0: Any?, sink: PigeonEventSink) {} + +override fun onCancel(p0: Any?) {} } diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 1ba6602a6c..47831151ff 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - app_settings (5.1.1): + - app_settings (6.1.2): - Flutter - device_info_plus (0.0.1): - Flutter @@ -37,32 +37,32 @@ PODS: - file_picker (0.0.1): - DKImagePickerController/PhotoGallery - Flutter - - Firebase/CoreOnly (12.4.0): - - FirebaseCore (~> 12.4.0) - - Firebase/Messaging (12.4.0): + - Firebase/CoreOnly (12.8.0): + - FirebaseCore (~> 12.8.0) + - Firebase/Messaging (12.8.0): - Firebase/CoreOnly - - FirebaseMessaging (~> 12.4.0) - - firebase_core (4.2.1): - - Firebase/CoreOnly (= 12.4.0) + - FirebaseMessaging (~> 12.8.0) + - firebase_core (4.4.0): + - Firebase/CoreOnly (= 12.8.0) - Flutter - - firebase_messaging (16.0.4): - - Firebase/Messaging (= 12.4.0) + - firebase_messaging (16.1.1): + - Firebase/Messaging (= 12.8.0) - firebase_core - Flutter - - FirebaseCore (12.4.0): - - FirebaseCoreInternal (~> 12.4.0) + - FirebaseCore (12.8.0): + - FirebaseCoreInternal (~> 12.8.0) - GoogleUtilities/Environment (~> 8.1) - GoogleUtilities/Logger (~> 8.1) - - FirebaseCoreInternal (12.4.0): + - FirebaseCoreInternal (12.8.0): - "GoogleUtilities/NSData+zlib (~> 8.1)" - - FirebaseInstallations (12.4.0): - - FirebaseCore (~> 12.4.0) + - FirebaseInstallations (12.8.0): + - FirebaseCore (~> 12.8.0) - GoogleUtilities/Environment (~> 8.1) - GoogleUtilities/UserDefaults (~> 8.1) - PromisesObjC (~> 2.4) - - FirebaseMessaging (12.4.0): - - FirebaseCore (~> 12.4.0) - - FirebaseInstallations (~> 12.4.0) + - FirebaseMessaging (12.8.0): + - FirebaseCore (~> 12.8.0) + - FirebaseInstallations (~> 12.8.0) - GoogleDataTransport (~> 10.1) - GoogleUtilities/AppDelegateSwizzler (~> 8.1) - GoogleUtilities/Environment (~> 8.1) @@ -108,34 +108,31 @@ PODS: - nanopb/encode (3.30910.0) - package_info_plus (0.4.5): - Flutter - - path_provider_foundation (0.0.1): - - Flutter - - FlutterMacOS - PromisesObjC (2.4.0) - - SDWebImage (5.21.5): - - SDWebImage/Core (= 5.21.5) - - SDWebImage/Core (5.21.5) + - SDWebImage (5.21.6): + - SDWebImage/Core (= 5.21.6) + - SDWebImage/Core (5.21.6) - share_plus (0.0.1): - Flutter - - sqlite3 (3.50.4): - - sqlite3/common (= 3.50.4) - - sqlite3/common (3.50.4) - - sqlite3/dbstatvtab (3.50.4): + - sqlite3 (3.51.1): + - sqlite3/common (= 3.51.1) + - sqlite3/common (3.51.1) + - sqlite3/dbstatvtab (3.51.1): - sqlite3/common - - sqlite3/fts5 (3.50.4): + - sqlite3/fts5 (3.51.1): - sqlite3/common - - sqlite3/math (3.50.4): + - sqlite3/math (3.51.1): - sqlite3/common - - sqlite3/perf-threadsafe (3.50.4): + - sqlite3/perf-threadsafe (3.51.1): - sqlite3/common - - sqlite3/rtree (3.50.4): + - sqlite3/rtree (3.51.1): - sqlite3/common - - sqlite3/session (3.50.4): + - sqlite3/session (3.51.1): - sqlite3/common - sqlite3_flutter_libs (0.0.1): - Flutter - FlutterMacOS - - sqlite3 (~> 3.50.4) + - sqlite3 (~> 3.51.1) - sqlite3/dbstatvtab - sqlite3/fts5 - sqlite3/math @@ -161,7 +158,6 @@ DEPENDENCIES: - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) - integration_test (from `.symlinks/plugins/integration_test/ios`) - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - share_plus (from `.symlinks/plugins/share_plus/ios`) - sqlite3_flutter_libs (from `.symlinks/plugins/sqlite3_flutter_libs/darwin`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) @@ -204,8 +200,6 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/integration_test/ios" package_info_plus: :path: ".symlinks/plugins/package_info_plus/ios" - path_provider_foundation: - :path: ".symlinks/plugins/path_provider_foundation/darwin" share_plus: :path: ".symlinks/plugins/share_plus/ios" sqlite3_flutter_libs: @@ -218,18 +212,18 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/wakelock_plus/ios" SPEC CHECKSUMS: - app_settings: 5127ae0678de1dcc19f2293271c51d37c89428b2 + app_settings: 0341ec6daa4f0c50f5a421bf0ad7c36084db6e90 device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60 file_picker: a0560bc09d61de87f12d246fc47d2119e6ef37be - Firebase: f07b15ae5a6ec0f93713e30b923d9970d144af3e - firebase_core: f1aafb21c14f497e5498f7ffc4dc63cbb52b2594 - firebase_messaging: c17a29984eafce4b2997fe078bb0a9e0b06f5dde - FirebaseCore: bb595f3114953664e3c1dc032f008a244147cfd3 - FirebaseCoreInternal: d7f5a043c2cd01a08103ab586587c1468047bca6 - FirebaseInstallations: ae9f4902cb5bf1d0c5eaa31ec1f4e5495a0714e2 - FirebaseMessaging: d33971b7bb252745ea6cd31ab190d1a1df4b8ed5 + Firebase: 9a58fdbc9d8655ed7b79a19cf9690bb007d3d46d + firebase_core: ee30637e6744af8e0c12a6a1e8a9718506ec2398 + firebase_messaging: 343de01a8d3e18b60df0c6d37f7174c44ae38e02 + FirebaseCore: 0dbad74bda10b8fb9ca34ad8f375fb9dd3ebef7c + FirebaseCoreInternal: fe5fa466aeb314787093a7dce9f0beeaad5a2a21 + FirebaseInstallations: 6a14ab3d694ebd9f839c48d330da5547e9ca9dc0 + FirebaseMessaging: 7f42cfd10ec64181db4e01b305a613791c8e782c Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467 GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7 GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1 @@ -237,12 +231,11 @@ SPEC CHECKSUMS: integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499 - path_provider_foundation: bb55f6dbba17d0dccd6737fe6f7f34fbd0376880 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 - SDWebImage: e9c98383c7572d713c1a0d7dd2783b10599b9838 + SDWebImage: 1bb6a1b84b6fe87b972a102bdc77dd589df33477 share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a - sqlite3: 73513155ec6979715d3904ef53a8d68892d4032b - sqlite3_flutter_libs: 83f8e9f5b6554077f1d93119fe20ebaa5f3a9ef1 + sqlite3: 8d708bc63e9f4ce48f0ad9d6269e478c5ced1d9b + sqlite3_flutter_libs: d13b8b3003f18f596e542bcb9482d105577eff41 SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4 url_launcher_ios: 7a95fa5b60cc718a708b8f2966718e93db0cef1b video_player_avfoundation: dd410b52df6d2466a42d28550e33e4146928280a diff --git a/ios/Runner/Notifications.g.swift b/ios/Runner/Notifications.g.swift index bda7404e97..afef7d34bd 100644 --- a/ios/Runner/Notifications.g.swift +++ b/ios/Runner/Notifications.g.swift @@ -1,4 +1,4 @@ -// Autogenerated from Pigeon (v26.1.2), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation diff --git a/lib/api/route/channels.dart b/lib/api/route/channels.dart index 6a006ade30..e5802da7c1 100644 --- a/lib/api/route/channels.dart +++ b/lib/api/route/channels.dart @@ -18,7 +18,7 @@ Future subscribeToChannel(ApiConnection connection, { }) { return connection.post('subscribeToChannel', (_) {}, 'users/me/subscriptions', { 'subscriptions': subscriptions.map((name) => {'name': name}).toList(), - if (principals != null) 'principals': principals, + 'principals': ?principals, }); } @@ -36,7 +36,7 @@ Future unsubscribeFromChannel(ApiConnection connection, { }) { return connection.delete('unsubscribeFromChannel', (_) {}, 'users/me/subscriptions', { 'subscriptions': subscriptions, - if (principals != null) 'principals': principals, + 'principals': ?principals, }); } diff --git a/lib/api/route/events.dart b/lib/api/route/events.dart index 589a9b8cbf..0b48099d15 100644 --- a/lib/api/route/events.dart +++ b/lib/api/route/events.dart @@ -30,8 +30,8 @@ Future getEvents(ApiConnection connection, { }) { return connection.get('getEvents', GetEventsResult.fromJson, 'events', { 'queue_id': RawParameter(queueId), - if (lastEventId != null) 'last_event_id': lastEventId, - if (dontBlock != null) 'dont_block': dontBlock, + 'last_event_id': ?lastEventId, + 'dont_block': ?dontBlock, }); } diff --git a/lib/api/route/messages.dart b/lib/api/route/messages.dart index 66e9cbeaf4..39f61f9ee0 100644 --- a/lib/api/route/messages.dart +++ b/lib/api/route/messages.dart @@ -14,7 +14,7 @@ Future getMessage(ApiConnection connection, { }) { assert(allowEmptyTopicName, '`allowEmptyTopicName` should only be true'); return connection.get('getMessage', GetMessageResult.fromJson, 'messages/$messageId', { - if (applyMarkdown != null) 'apply_markdown': applyMarkdown, + 'apply_markdown': ?applyMarkdown, 'allow_empty_topic_name': allowEmptyTopicName, }); } @@ -51,11 +51,11 @@ Future getMessages(ApiConnection connection, { return connection.get('getMessages', GetMessagesResult.fromJson, 'messages', { 'narrow': resolveApiNarrowForServer(narrow, connection.zulipFeatureLevel!), 'anchor': RawParameter(anchor.toJson()), - if (includeAnchor != null) 'include_anchor': includeAnchor, + 'include_anchor': ?includeAnchor, 'num_before': numBefore, 'num_after': numAfter, - if (clientGravatar != null) 'client_gravatar': clientGravatar, - if (applyMarkdown != null) 'apply_markdown': applyMarkdown, + 'client_gravatar': ?clientGravatar, + 'apply_markdown': ?applyMarkdown, 'allow_empty_topic_name': allowEmptyTopicName, }); } @@ -149,7 +149,7 @@ Future sendMessage( 'content': RawParameter(content), if (queueId != null) 'queue_id': RawParameter(queueId), if (localId != null) 'local_id': RawParameter(localId), - if (readBySender != null) 'read_by_sender': readBySender, + 'read_by_sender': ?readBySender, }, overrideUserAgent: switch ((supportsReadBySender, readBySender)) { // Old servers use the user agent to decide if we're a UI client @@ -227,11 +227,11 @@ Future updateMessage( return connection.patch('updateMessage', UpdateMessageResult.fromJson, 'messages/$messageId', { if (topic != null) 'topic': RawParameter(topic.apiName), if (propagateMode != null) 'propagate_mode': RawParameter(propagateMode.toJson()), - if (sendNotificationToOldThread != null) 'send_notification_to_old_thread': sendNotificationToOldThread, - if (sendNotificationToNewThread != null) 'send_notification_to_new_thread': sendNotificationToNewThread, + 'send_notification_to_old_thread': ?sendNotificationToOldThread, + 'send_notification_to_new_thread': ?sendNotificationToNewThread, if (content != null) 'content': RawParameter(content), if (prevContentSha256 != null) 'prev_content_sha256': RawParameter(prevContentSha256), - if (streamId != null) 'stream_id': streamId, + 'stream_id': ?streamId, }); } @@ -381,7 +381,7 @@ Future updateMessageFlagsForNarrow(ApiConnect }) { return connection.post('updateMessageFlagsForNarrow', UpdateMessageFlagsForNarrowResult.fromJson, 'messages/flags/narrow', { 'anchor': RawParameter(anchor.toJson()), - if (includeAnchor != null) 'include_anchor': includeAnchor, + 'include_anchor': ?includeAnchor, 'num_before': numBefore, 'num_after': numAfter, 'narrow': resolveApiNarrowForServer(narrow, connection.zulipFeatureLevel!), diff --git a/lib/api/route/users.dart b/lib/api/route/users.dart index 4e47d97576..2eb9fab87b 100644 --- a/lib/api/route/users.dart +++ b/lib/api/route/users.dart @@ -68,10 +68,10 @@ Future updatePresence(ApiConnection connection, { required PresenceStatus status, }) { return connection.post('updatePresence', UpdatePresenceResult.fromJson, 'users/me/presence', { - if (lastUpdateId != null) 'last_update_id': lastUpdateId, - if (historyLimitDays != null) 'history_limit_days': historyLimitDays, - if (newUserInput != null) 'new_user_input': newUserInput, - if (pingOnly != null) 'ping_only': pingOnly, + 'last_update_id': ?lastUpdateId, + 'history_limit_days': ?historyLimitDays, + 'new_user_input': ?newUserInput, + 'ping_only': ?pingOnly, 'status': RawParameter(status.toJson()), 'slim_presence': true, }); diff --git a/lib/host/android_intents.g.dart b/lib/host/android_intents.g.dart index 3397668c39..4e60556435 100644 --- a/lib/host/android_intents.g.dart +++ b/lib/host/android_intents.g.dart @@ -1,6 +1,6 @@ -// Autogenerated from Pigeon (v26.1.2), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon -// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; diff --git a/lib/host/android_notifications.g.dart b/lib/host/android_notifications.g.dart index dbca7cc3d7..2fc54c0297 100644 --- a/lib/host/android_notifications.g.dart +++ b/lib/host/android_notifications.g.dart @@ -1,6 +1,6 @@ -// Autogenerated from Pigeon (v26.1.2), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon -// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; @@ -688,15 +688,14 @@ class AndroidNotificationHostApi { /// /// See: https://developer.android.com/reference/androidx/core/app/NotificationManagerCompat#createNotificationChannel(androidx.core.app.NotificationChannelCompat) Future createNotificationChannel(NotificationChannel channel) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.zulip.AndroidNotificationHostApi.createNotificationChannel$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final pigeonVar_channelName = 'dev.flutter.pigeon.zulip.AndroidNotificationHostApi.createNotificationChannel$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send([channel]); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -714,15 +713,14 @@ class AndroidNotificationHostApi { /// /// See: https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getNotificationChannelsCompat() Future> getNotificationChannels() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.zulip.AndroidNotificationHostApi.getNotificationChannels$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final pigeonVar_channelName = 'dev.flutter.pigeon.zulip.AndroidNotificationHostApi.getNotificationChannels$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -745,15 +743,14 @@ class AndroidNotificationHostApi { /// /// See: https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#deleteNotificationChannel(java.lang.String) Future deleteNotificationChannel(String channelId) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.zulip.AndroidNotificationHostApi.deleteNotificationChannel$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final pigeonVar_channelName = 'dev.flutter.pigeon.zulip.AndroidNotificationHostApi.deleteNotificationChannel$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send([channelId]); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -778,15 +775,14 @@ class AndroidNotificationHostApi { /// /// See: https://developer.android.com/reference/android/content/ContentResolver#query(android.net.Uri,%20java.lang.String[],%20java.lang.String,%20java.lang.String[],%20java.lang.String) Future> listStoredSoundsInNotificationsDirectory() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.zulip.AndroidNotificationHostApi.listStoredSoundsInNotificationsDirectory$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final pigeonVar_channelName = 'dev.flutter.pigeon.zulip.AndroidNotificationHostApi.listStoredSoundsInNotificationsDirectory$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -820,15 +816,14 @@ class AndroidNotificationHostApi { /// https://developer.android.com/reference/android/content/ContentResolver#openOutputStream(android.net.Uri) /// https://developer.android.com/reference/android/content/res/Resources#openRawResource(int) Future copySoundResourceToMediaStore({required String targetFileDisplayName, required String sourceResourceName}) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.zulip.AndroidNotificationHostApi.copySoundResourceToMediaStore$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final pigeonVar_channelName = 'dev.flutter.pigeon.zulip.AndroidNotificationHostApi.copySoundResourceToMediaStore$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send([targetFileDisplayName, sourceResourceName]); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -865,15 +860,14 @@ class AndroidNotificationHostApi { /// https://developer.android.com/reference/kotlin/android/app/NotificationManager.html#notify /// https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder Future notify({String? tag, required int id, bool? autoCancel, required String channelId, int? color, PendingIntent? contentIntent, String? contentText, String? contentTitle, Map? extras, String? groupKey, InboxStyle? inboxStyle, bool? isGroupSummary, MessagingStyle? messagingStyle, int? number, String? smallIconResourceName, }) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.zulip.AndroidNotificationHostApi.notify$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final pigeonVar_channelName = 'dev.flutter.pigeon.zulip.AndroidNotificationHostApi.notify$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send([tag, id, autoCancel, channelId, color, contentIntent, contentText, contentTitle, extras, groupKey, inboxStyle, isGroupSummary, messagingStyle, number, smallIconResourceName]); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -899,15 +893,14 @@ class AndroidNotificationHostApi { /// https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat#getActiveNotifications() /// https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.MessagingStyle#extractMessagingStyleFromNotification(android.app.Notification) Future getActiveNotificationMessagingStyleByTag(String tag) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.zulip.AndroidNotificationHostApi.getActiveNotificationMessagingStyleByTag$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final pigeonVar_channelName = 'dev.flutter.pigeon.zulip.AndroidNotificationHostApi.getActiveNotificationMessagingStyleByTag$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send([tag]); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -930,15 +923,14 @@ class AndroidNotificationHostApi { /// /// See: https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat?hl=en#getActiveNotifications() Future> getActiveNotifications({required List desiredExtras}) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.zulip.AndroidNotificationHostApi.getActiveNotifications$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final pigeonVar_channelName = 'dev.flutter.pigeon.zulip.AndroidNotificationHostApi.getActiveNotifications$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send([desiredExtras]); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { @@ -961,15 +953,14 @@ class AndroidNotificationHostApi { /// /// See: https://developer.android.com/reference/kotlin/androidx/core/app/NotificationManagerCompat?hl=en#cancel(java.lang.String,int) Future cancel({String? tag, required int id}) async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.zulip.AndroidNotificationHostApi.cancel$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final pigeonVar_channelName = 'dev.flutter.pigeon.zulip.AndroidNotificationHostApi.cancel$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send([tag, id]); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/lib/host/notifications.g.dart b/lib/host/notifications.g.dart index a69c8670ef..96600ab1cb 100644 --- a/lib/host/notifications.g.dart +++ b/lib/host/notifications.g.dart @@ -1,6 +1,6 @@ -// Autogenerated from Pigeon (v26.1.2), do not edit directly. +// Autogenerated from Pigeon (v26.1.7), do not edit directly. // See also: https://pub.dev/packages/pigeon -// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, omit_obvious_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; @@ -235,15 +235,14 @@ class NotificationHostApi { /// else null. See Apple doc: /// https://developer.apple.com/documentation/uikit/uiapplication/launchoptionskey/remotenotification Future getNotificationDataFromLaunch() async { - final String pigeonVar_channelName = 'dev.flutter.pigeon.zulip.NotificationHostApi.getNotificationDataFromLaunch$pigeonVar_messageChannelSuffix'; - final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( + final pigeonVar_channelName = 'dev.flutter.pigeon.zulip.NotificationHostApi.getNotificationDataFromLaunch$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); - final List? pigeonVar_replyList = - await pigeonVar_sendFuture as List?; + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { diff --git a/lib/model/database.dart b/lib/model/database.dart index 43ba0fb448..8f10a7d5d7 100644 --- a/lib/model/database.dart +++ b/lib/model/database.dart @@ -341,8 +341,7 @@ class AppDatabase extends _$AppDatabase { Future> getIntGlobalSettings() async { return { for (final row in await select(intGlobalSettings).get()) - if (IntGlobalSetting.byName(row.name) case final setting?) - setting: row.value + ?IntGlobalSetting.byName(row.name): row.value }; } diff --git a/lib/model/schema_versions.g.dart b/lib/model/schema_versions.g.dart index a6622b8df7..1eaa2243de 100644 --- a/lib/model/schema_versions.g.dart +++ b/lib/model/schema_versions.g.dart @@ -1,9 +1,10 @@ // dart format width=80 import 'package:drift/internal/versioned_schema.dart' as i0; import 'package:drift/drift.dart' as i1; -import 'package:drift/drift.dart'; // ignore_for_file: type=lint,unused_import +import 'package:drift/drift.dart'; // GENERATED BY drift_dev, DO NOT MODIFY. -// GENERATED BY drift_dev, DO NOT MODIFY. +// ignore_for_file: type=lint,unused_import +// final class Schema2 extends i0.VersionedSchema { Schema2({required super.database}) : super(version: 2); @override @@ -763,18 +764,18 @@ final class Schema12 extends i0.VersionedSchema { withoutRowId: false, isStrict: false, tableConstraints: [], - columns: [_column_9, _column_10, _column_13, _column_14, _column_15], + columns: [_column_17, _column_18, _column_19, _column_20, _column_21], attachedDatabase: database, ), alias: null, ); - late final Shape3 boolGlobalSettings = Shape3( + late final Shape7 boolGlobalSettings = Shape7( source: i0.VersionedTable( entityName: 'bool_global_settings', withoutRowId: false, isStrict: false, tableConstraints: ['PRIMARY KEY(name)'], - columns: [_column_11, _column_12], + columns: [_column_22, _column_23], attachedDatabase: database, ), alias: null, @@ -785,7 +786,7 @@ final class Schema12 extends i0.VersionedSchema { withoutRowId: false, isStrict: false, tableConstraints: ['PRIMARY KEY(name)'], - columns: [_column_11, _column_16], + columns: [_column_22, _column_24], attachedDatabase: database, ), alias: null, @@ -800,17 +801,17 @@ final class Schema12 extends i0.VersionedSchema { 'UNIQUE(realm_url, email)', ], columns: [ - _column_0, - _column_1, - _column_17, - _column_18, - _column_2, - _column_3, - _column_4, - _column_5, - _column_6, - _column_7, - _column_8, + _column_25, + _column_26, + _column_27, + _column_28, + _column_29, + _column_30, + _column_31, + _column_32, + _column_33, + _column_34, + _column_35, ], attachedDatabase: database, ), @@ -818,6 +819,71 @@ final class Schema12 extends i0.VersionedSchema { ); } +i1.GeneratedColumn _column_17(String aliasedName) => + i1.GeneratedColumn( + 'theme_setting', + aliasedName, + true, + type: i1.DriftSqlType.string, + $customConstraints: 'NULL', + ); +i1.GeneratedColumn _column_18(String aliasedName) => + i1.GeneratedColumn( + 'browser_preference', + aliasedName, + true, + type: i1.DriftSqlType.string, + $customConstraints: 'NULL', + ); +i1.GeneratedColumn _column_19(String aliasedName) => + i1.GeneratedColumn( + 'visit_first_unread', + aliasedName, + true, + type: i1.DriftSqlType.string, + $customConstraints: 'NULL', + ); +i1.GeneratedColumn _column_20(String aliasedName) => + i1.GeneratedColumn( + 'mark_read_on_scroll', + aliasedName, + true, + type: i1.DriftSqlType.string, + $customConstraints: 'NULL', + ); +i1.GeneratedColumn _column_21(String aliasedName) => + i1.GeneratedColumn( + 'legacy_upgrade_state', + aliasedName, + true, + type: i1.DriftSqlType.string, + $customConstraints: 'NULL', + ); +i1.GeneratedColumn _column_22(String aliasedName) => + i1.GeneratedColumn( + 'name', + aliasedName, + false, + type: i1.DriftSqlType.string, + $customConstraints: 'NOT NULL', + ); +i1.GeneratedColumn _column_23(String aliasedName) => + i1.GeneratedColumn( + 'value', + aliasedName, + false, + type: i1.DriftSqlType.int, + $customConstraints: 'NOT NULL CHECK (value IN (0, 1))', + ); +i1.GeneratedColumn _column_24(String aliasedName) => + i1.GeneratedColumn( + 'value', + aliasedName, + false, + type: i1.DriftSqlType.int, + $customConstraints: 'NOT NULL', + ); + class Shape8 extends i0.VersionedTable { Shape8({required super.source, required super.alias}) : super.aliased(); i1.GeneratedColumn get id => @@ -844,19 +910,94 @@ class Shape8 extends i0.VersionedTable { columnsByName['acked_push_token']! as i1.GeneratedColumn; } -i1.GeneratedColumn _column_17(String aliasedName) => +i1.GeneratedColumn _column_25(String aliasedName) => + i1.GeneratedColumn( + 'id', + aliasedName, + false, + hasAutoIncrement: true, + type: i1.DriftSqlType.int, + $customConstraints: 'NOT NULL PRIMARY KEY AUTOINCREMENT', + ); +i1.GeneratedColumn _column_26(String aliasedName) => + i1.GeneratedColumn( + 'realm_url', + aliasedName, + false, + type: i1.DriftSqlType.string, + $customConstraints: 'NOT NULL', + ); +i1.GeneratedColumn _column_27(String aliasedName) => i1.GeneratedColumn( 'realm_name', aliasedName, true, type: i1.DriftSqlType.string, + $customConstraints: 'NULL', ); -i1.GeneratedColumn _column_18(String aliasedName) => +i1.GeneratedColumn _column_28(String aliasedName) => i1.GeneratedColumn( 'realm_icon', aliasedName, true, type: i1.DriftSqlType.string, + $customConstraints: 'NULL', + ); +i1.GeneratedColumn _column_29(String aliasedName) => + i1.GeneratedColumn( + 'user_id', + aliasedName, + false, + type: i1.DriftSqlType.int, + $customConstraints: 'NOT NULL', + ); +i1.GeneratedColumn _column_30(String aliasedName) => + i1.GeneratedColumn( + 'email', + aliasedName, + false, + type: i1.DriftSqlType.string, + $customConstraints: 'NOT NULL', + ); +i1.GeneratedColumn _column_31(String aliasedName) => + i1.GeneratedColumn( + 'api_key', + aliasedName, + false, + type: i1.DriftSqlType.string, + $customConstraints: 'NOT NULL', + ); +i1.GeneratedColumn _column_32(String aliasedName) => + i1.GeneratedColumn( + 'zulip_version', + aliasedName, + false, + type: i1.DriftSqlType.string, + $customConstraints: 'NOT NULL', + ); +i1.GeneratedColumn _column_33(String aliasedName) => + i1.GeneratedColumn( + 'zulip_merge_base', + aliasedName, + true, + type: i1.DriftSqlType.string, + $customConstraints: 'NULL', + ); +i1.GeneratedColumn _column_34(String aliasedName) => + i1.GeneratedColumn( + 'zulip_feature_level', + aliasedName, + false, + type: i1.DriftSqlType.int, + $customConstraints: 'NOT NULL', + ); +i1.GeneratedColumn _column_35(String aliasedName) => + i1.GeneratedColumn( + 'acked_push_token', + aliasedName, + true, + type: i1.DriftSqlType.string, + $customConstraints: 'NULL', ); i0.MigrationStepWithVersion migrationSteps({ required Future Function(i1.Migrator m, Schema2 schema) from1To2, diff --git a/lib/widgets/actions.dart b/lib/widgets/actions.dart index a546e0e13d..d92dbad306 100644 --- a/lib/widgets/actions.dart +++ b/lib/widgets/actions.dart @@ -456,7 +456,7 @@ abstract final class PlatformActions { title: zulipLocalizations.errorCouldNotOpenLinkTitle, message: [ zulipLocalizations.errorCouldNotOpenLink(url.toString()), - if (errorMessage != null) errorMessage, + ?errorMessage, ].join("\n\n")); } } diff --git a/lib/widgets/button.dart b/lib/widgets/button.dart index 64c8c1d994..6b4bb8efc1 100644 --- a/lib/widgets/button.dart +++ b/lib/widgets/button.dart @@ -484,7 +484,7 @@ class ZulipMenuItemButton extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, spacing: itemSpacingAndEndPadding, children: [ - if (toggle != null) toggle!, + ?toggle, if (icon != null) Icon(icon!, color: _iconColor(designVariables)), ])) : null, diff --git a/lib/widgets/compose_box.dart b/lib/widgets/compose_box.dart index 0a9b61e5a5..7766e2df2d 100644 --- a/lib/widgets/compose_box.dart +++ b/lib/widgets/compose_box.dart @@ -1499,7 +1499,7 @@ abstract class _ComposeBoxBody extends StatelessWidget { child: Theme( data: inputThemeData, child: Column(children: [ - if (topicInput != null) topicInput, + ?topicInput, buildContentInput(), ]))), SizedBox( @@ -1510,7 +1510,7 @@ abstract class _ComposeBoxBody extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Row(children: composeButtons), - if (sendButton != null) sendButton, + ?sendButton, ]))), ]); } diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 2014885ccc..bfc3963626 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -12,7 +12,6 @@ import file_selector_macos import firebase_core import firebase_messaging import package_info_plus -import path_provider_foundation import share_plus import sqlite3_flutter_libs import url_launcher_macos @@ -27,7 +26,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) - PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) Sqlite3FlutterLibsPlugin.register(with: registry.registrar(forPlugin: "Sqlite3FlutterLibsPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) diff --git a/macos/Podfile.lock b/macos/Podfile.lock index 94649404f7..d70d5f4d72 100644 --- a/macos/Podfile.lock +++ b/macos/Podfile.lock @@ -7,33 +7,33 @@ PODS: - FlutterMacOS - file_selector_macos (0.0.1): - FlutterMacOS - - Firebase/CoreOnly (12.4.0): - - FirebaseCore (~> 12.4.0) - - Firebase/Messaging (12.4.0): + - Firebase/CoreOnly (12.8.0): + - FirebaseCore (~> 12.8.0) + - Firebase/Messaging (12.8.0): - Firebase/CoreOnly - - FirebaseMessaging (~> 12.4.0) - - firebase_core (4.2.1): - - Firebase/CoreOnly (~> 12.4.0) + - FirebaseMessaging (~> 12.8.0) + - firebase_core (4.4.0): + - Firebase/CoreOnly (~> 12.8.0) - FlutterMacOS - - firebase_messaging (16.0.4): - - Firebase/CoreOnly (~> 12.4.0) - - Firebase/Messaging (~> 12.4.0) + - firebase_messaging (16.1.1): + - Firebase/CoreOnly (~> 12.8.0) + - Firebase/Messaging (~> 12.8.0) - firebase_core - FlutterMacOS - - FirebaseCore (12.4.0): - - FirebaseCoreInternal (~> 12.4.0) + - FirebaseCore (12.8.0): + - FirebaseCoreInternal (~> 12.8.0) - GoogleUtilities/Environment (~> 8.1) - GoogleUtilities/Logger (~> 8.1) - - FirebaseCoreInternal (12.4.0): + - FirebaseCoreInternal (12.8.0): - "GoogleUtilities/NSData+zlib (~> 8.1)" - - FirebaseInstallations (12.4.0): - - FirebaseCore (~> 12.4.0) + - FirebaseInstallations (12.8.0): + - FirebaseCore (~> 12.8.0) - GoogleUtilities/Environment (~> 8.1) - GoogleUtilities/UserDefaults (~> 8.1) - PromisesObjC (~> 2.4) - - FirebaseMessaging (12.4.0): - - FirebaseCore (~> 12.4.0) - - FirebaseInstallations (~> 12.4.0) + - FirebaseMessaging (12.8.0): + - FirebaseCore (~> 12.8.0) + - FirebaseInstallations (~> 12.8.0) - GoogleDataTransport (~> 10.1) - GoogleUtilities/AppDelegateSwizzler (~> 8.1) - GoogleUtilities/Environment (~> 8.1) @@ -75,31 +75,28 @@ PODS: - nanopb/encode (3.30910.0) - package_info_plus (0.0.1): - FlutterMacOS - - path_provider_foundation (0.0.1): - - Flutter - - FlutterMacOS - PromisesObjC (2.4.0) - share_plus (0.0.1): - FlutterMacOS - - sqlite3 (3.50.4): - - sqlite3/common (= 3.50.4) - - sqlite3/common (3.50.4) - - sqlite3/dbstatvtab (3.50.4): + - sqlite3 (3.51.1): + - sqlite3/common (= 3.51.1) + - sqlite3/common (3.51.1) + - sqlite3/dbstatvtab (3.51.1): - sqlite3/common - - sqlite3/fts5 (3.50.4): + - sqlite3/fts5 (3.51.1): - sqlite3/common - - sqlite3/math (3.50.4): + - sqlite3/math (3.51.1): - sqlite3/common - - sqlite3/perf-threadsafe (3.50.4): + - sqlite3/perf-threadsafe (3.51.1): - sqlite3/common - - sqlite3/rtree (3.50.4): + - sqlite3/rtree (3.51.1): - sqlite3/common - - sqlite3/session (3.50.4): + - sqlite3/session (3.51.1): - sqlite3/common - sqlite3_flutter_libs (0.0.1): - Flutter - FlutterMacOS - - sqlite3 (~> 3.50.4) + - sqlite3 (~> 3.51.1) - sqlite3/dbstatvtab - sqlite3/fts5 - sqlite3/math @@ -123,7 +120,6 @@ DEPENDENCIES: - firebase_messaging (from `Flutter/ephemeral/.symlinks/plugins/firebase_messaging/macos`) - FlutterMacOS (from `Flutter/ephemeral`) - package_info_plus (from `Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos`) - - path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`) - share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`) - sqlite3_flutter_libs (from `Flutter/ephemeral/.symlinks/plugins/sqlite3_flutter_libs/darwin`) - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) @@ -160,8 +156,6 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral package_info_plus: :path: Flutter/ephemeral/.symlinks/plugins/package_info_plus/macos - path_provider_foundation: - :path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin share_plus: :path: Flutter/ephemeral/.symlinks/plugins/share_plus/macos sqlite3_flutter_libs: @@ -178,23 +172,22 @@ SPEC CHECKSUMS: device_info_plus: 4fb280989f669696856f8b129e4a5e3cd6c48f76 file_picker: 7584aae6fa07a041af2b36a2655122d42f578c1a file_selector_macos: 9e9e068e90ebee155097d00e89ae91edb2374db7 - Firebase: f07b15ae5a6ec0f93713e30b923d9970d144af3e - firebase_core: e054894ab56033ef9bcbe2d9eac9395e5306e2fc - firebase_messaging: 373ac3a56e5aa37bb9aff4127f700aa5973c1168 - FirebaseCore: bb595f3114953664e3c1dc032f008a244147cfd3 - FirebaseCoreInternal: d7f5a043c2cd01a08103ab586587c1468047bca6 - FirebaseInstallations: ae9f4902cb5bf1d0c5eaa31ec1f4e5495a0714e2 - FirebaseMessaging: d33971b7bb252745ea6cd31ab190d1a1df4b8ed5 + Firebase: 9a58fdbc9d8655ed7b79a19cf9690bb007d3d46d + firebase_core: b1697fb64ff2b9ca16baaa821205f8b0c058e5d2 + firebase_messaging: e6b30479b390f3a41203a7244886c6ab345536d3 + FirebaseCore: 0dbad74bda10b8fb9ca34ad8f375fb9dd3ebef7c + FirebaseCoreInternal: fe5fa466aeb314787093a7dce9f0beeaad5a2a21 + FirebaseInstallations: 6a14ab3d694ebd9f839c48d330da5547e9ca9dc0 + FirebaseMessaging: 7f42cfd10ec64181db4e01b305a613791c8e782c FlutterMacOS: d0db08ddef1a9af05a5ec4b724367152bb0500b1 GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7 GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1 nanopb: fad817b59e0457d11a5dfbde799381cd727c1275 package_info_plus: f0052d280d17aa382b932f399edf32507174e870 - path_provider_foundation: bb55f6dbba17d0dccd6737fe6f7f34fbd0376880 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 share_plus: 510bf0af1a42cd602274b4629920c9649c52f4cc - sqlite3: 73513155ec6979715d3904ef53a8d68892d4032b - sqlite3_flutter_libs: 83f8e9f5b6554077f1d93119fe20ebaa5f3a9ef1 + sqlite3: 8d708bc63e9f4ce48f0ad9d6269e478c5ced1d9b + sqlite3_flutter_libs: d13b8b3003f18f596e542bcb9482d105577eff41 url_launcher_macos: f87a979182d112f911de6820aefddaf56ee9fbfd video_player_avfoundation: dd410b52df6d2466a42d28550e33e4146928280a wakelock_plus: 917609be14d812ddd9e9528876538b2263aaa03b diff --git a/pubspec.lock b/pubspec.lock index 600e0daa11..96496e33c6 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,34 +5,34 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: c209688d9f5a5f26b2fb47a188131a6fb9e876ae9e47af3737c0b4f58a93470d + sha256: "5b7468c326d2f8a4f630056404ca0d291ade42918f4a3c6233618e724f39da8e" url: "https://pub.dev" source: hosted - version: "91.0.0" + version: "92.0.0" _flutterfire_internals: dependency: transitive description: name: _flutterfire_internals - sha256: "8a1f5f3020ef2a74fb93f7ab3ef127a8feea33a7a2276279113660784ee7516a" + sha256: cd83f7d6bd4e4c0b0b4fef802e8796784032e1cc23d7b0e982cf5d05d9bbe182 url: "https://pub.dev" source: hosted - version: "1.3.64" + version: "1.3.66" analyzer: dependency: transitive description: name: analyzer - sha256: f51c8499b35f9b26820cfe914828a6a98a94efd5cc78b37bb7d03debae3a1d08 + sha256: "70e4b1ef8003c64793a9e268a551a82869a8a96f39deb73dea28084b0e8bf75e" url: "https://pub.dev" source: hosted - version: "8.4.1" + version: "9.0.0" app_settings: dependency: "direct main" description: name: app_settings - sha256: "3e46c561441e5820d3a25339bf8b51b9e45a5f686873851a20c257a530917795" + sha256: "64d50e666fd96ae90301bf71205f05019286f940ad6f5fed3d1be19c6af7546a" url: "https://pub.dev" source: hosted - version: "6.1.1" + version: "7.0.0" args: dependency: "direct dev" description: @@ -61,10 +61,10 @@ packages: dependency: transitive description: name: build - sha256: c1668065e9ba04752570ad7e038288559d1e2ca5c6d0131c0f5f55e39e777413 + sha256: "275bf6bb2a00a9852c28d4e0b410da1d833a734d57d39d44f94bfc895a484ec3" url: "https://pub.dev" source: hosted - version: "4.0.3" + version: "4.0.4" build_config: dependency: transitive description: @@ -85,10 +85,10 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "110c56ef29b5eb367b4d17fc79375fa8c18a6cd7acd92c05bb3986c17a079057" + sha256: "39ad4ca8a2876779737c60e4228b4bcd35d4352ef7e14e47514093edc012c734" url: "https://pub.dev" source: hosted - version: "2.10.4" + version: "2.11.1" built_collection: dependency: transitive description: @@ -101,10 +101,10 @@ packages: dependency: transitive description: name: built_value - sha256: "426cf75afdb23aa74bd4e471704de3f9393f3c7b04c1e2d9c6f1073ae0b8b139" + sha256: "7931c90b84bc573fef103548e354258ae4c9d28d140e41961df6843c5d60d4d8" url: "https://pub.dev" source: hosted - version: "8.12.1" + version: "8.12.3" characters: dependency: transitive description: @@ -161,14 +161,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.2" + code_assets: + dependency: transitive + description: + name: code_assets + sha256: "83ccdaa064c980b5596c35dd64a8d3ecc68620174ab9b90b6343b753aa721687" + url: "https://pub.dev" + source: hosted + version: "1.0.0" code_builder: dependency: transitive description: name: code_builder - sha256: "11654819532ba94c34de52ff5feb52bd81cba1de00ef2ed622fd50295f9d4243" + sha256: "6a6cab2ba4680d6423f34a9b972a4c9a94ebe1b62ecec4e1a1f2cba91fd1319d" url: "https://pub.dev" source: hosted - version: "4.11.0" + version: "4.11.1" collection: dependency: "direct main" description: @@ -206,10 +214,10 @@ packages: dependency: transitive description: name: cross_file - sha256: "701dcfc06da0882883a2657c445103380e53e647060ad8d9dfb710c100996608" + sha256: "28bb3ae56f117b5aec029d702a90f57d285cd975c3c5c281eaca38dbc47c5937" url: "https://pub.dev" source: hosted - version: "0.3.5+1" + version: "0.3.5+2" crypto: dependency: "direct main" description: @@ -238,18 +246,18 @@ packages: dependency: transitive description: name: dbus - sha256: "79e0c23480ff85dc68de79e2cd6334add97e48f7f4865d17686dd6ea81a47e8c" + sha256: d0c98dcd4f5169878b6cf8f6e0a52403a9dff371a3e2f019697accbf6f44a270 url: "https://pub.dev" source: hosted - version: "0.7.11" + version: "0.7.12" device_info_plus: dependency: "direct main" description: name: device_info_plus - sha256: dd0e8e02186b2196c7848c9d394a5fd6e5b57a43a546082c5820b1ec72317e33 + sha256: "4df8babf73058181227e18b08e6ea3520cf5fc5d796888d33b7cb0f33f984b7c" url: "https://pub.dev" source: hosted - version: "12.2.0" + version: "12.3.0" device_info_plus_platform_interface: dependency: transitive description: @@ -262,18 +270,18 @@ packages: dependency: "direct main" description: name: drift - sha256: "83290a32ae006a7535c5ecf300722cb77177250d9df4ee2becc5fa8a36095114" + sha256: "970cd188fddb111b26ea6a9b07a62bf5c2432d74147b8122c67044ae3b97e99e" url: "https://pub.dev" source: hosted - version: "2.29.0" + version: "2.31.0" drift_dev: dependency: "direct dev" description: name: drift_dev - sha256: "6019f827544e77524ffd5134ae0cb75dfd92ef5ef3e269872af92840c929cd43" + sha256: "917184b2fb867b70a548a83bf0d36268423b38d39968c06cce4905683da49587" url: "https://pub.dev" source: hosted - version: "2.29.0" + version: "2.31.0" fake_async: dependency: "direct dev" description: @@ -286,10 +294,10 @@ packages: dependency: transitive description: name: ffi - sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" + sha256: "6d7fd89431262d8f3125e81b50d3847a091d846eafcd4fdb88dd06f36d705a45" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" file: dependency: transitive description: @@ -302,10 +310,10 @@ packages: dependency: "direct main" description: name: file_picker - sha256: "7872545770c277236fd32b022767576c562ba28366204ff1a5628853cf8f2200" + sha256: "57d9a1dd5063f85fa3107fb42d1faffda52fdc948cefd5fe5ea85267a5fc7343" url: "https://pub.dev" source: hosted - version: "10.3.7" + version: "10.3.10" file_selector_linux: dependency: transitive description: @@ -342,10 +350,10 @@ packages: dependency: "direct main" description: name: firebase_core - sha256: "1f2dfd9f535d81f8b06d7a50ecda6eac1e6922191ed42e09ca2c84bd2288927c" + sha256: "923085c881663ef685269b013e241b428e1fb03cdd0ebde265d9b40ff18abf80" url: "https://pub.dev" source: hosted - version: "4.2.1" + version: "4.4.0" firebase_core_platform_interface: dependency: transitive description: @@ -358,34 +366,34 @@ packages: dependency: transitive description: name: firebase_core_web - sha256: ff18fabb0ad0ed3595d2f2c85007ecc794aadecdff5b3bb1460b7ee47cded398 + sha256: "83e7356c704131ca4d8d8dd57e360d8acecbca38b1a3705c7ae46cc34c708084" url: "https://pub.dev" source: hosted - version: "3.3.0" + version: "3.4.0" firebase_messaging: dependency: "direct main" description: name: firebase_messaging - sha256: "22086f857d2340f5d973776cfd542d3fb30cf98e1c643c3aa4a7520bb12745bb" + sha256: "06fad40ea14771e969a8f2bbce1944aa20ee2f4f57f4eca5b3ba346b65f3f644" url: "https://pub.dev" source: hosted - version: "16.0.4" + version: "16.1.1" firebase_messaging_platform_interface: dependency: transitive description: name: firebase_messaging_platform_interface - sha256: a59920cbf2eb7c83d34a5f354331210ffec116b216dc72d864d8b8eb983ca398 + sha256: "6c49e901c77e6e10e86d98e32056a087eb1ca1b93acdf58524f1961e617657b7" url: "https://pub.dev" source: hosted - version: "4.7.4" + version: "4.7.6" firebase_messaging_web: dependency: transitive description: name: firebase_messaging_web - sha256: "1183e40e6fd2a279a628951cc3b639fcf5ffe7589902632db645011eb70ebefb" + sha256: "2756f8fea583ffb9d294d15ddecb3a9ad429b023b70c9990c151fc92c54a32b3" url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "4.1.2" fixnum: dependency: transitive description: @@ -481,6 +489,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.2" + hooks: + dependency: transitive + description: + name: hooks + sha256: "7a08a0d684cb3b8fb604b78455d5d352f502b68079f7b80b831c62220ab0a4f6" + url: "https://pub.dev" + source: hosted + version: "1.0.1" html: dependency: "direct main" description: @@ -525,10 +541,10 @@ packages: dependency: transitive description: name: image_picker_android - sha256: "5e9bf126c37c117cf8094215373c6d561117a3cfb50ebc5add1a61dc6e224677" + sha256: "518a16108529fc18657a3e6dde4a043dc465d16596d20ab2abd49a4cac2e703d" url: "https://pub.dev" source: hosted - version: "0.8.13+10" + version: "0.8.13+13" image_picker_for_web: dependency: transitive description: @@ -541,10 +557,10 @@ packages: dependency: transitive description: name: image_picker_ios - sha256: "997d100ce1dda5b1ba4085194c5e36c9f8a1fb7987f6a36ab677a344cd2dc986" + sha256: b9c4a438a9ff4f60808c9cf0039b93a42bb6c2211ef6ebb647394b2b3fa84588 url: "https://pub.dev" source: hosted - version: "0.8.13+2" + version: "0.8.13+6" image_picker_linux: dependency: transitive description: @@ -610,18 +626,26 @@ packages: dependency: "direct main" description: name: json_annotation - sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + sha256: "805fa86df56383000f640384b282ce0cb8431f1a7a2396de92fb66186d8c57df" url: "https://pub.dev" source: hosted - version: "4.9.0" + version: "4.10.0" + json_schema: + dependency: transitive + description: + name: json_schema + sha256: f37d9c3fdfe8c9aae55fdfd5af815d24ce63c3a0f6a2c1f0982c30f43643fa1a + url: "https://pub.dev" + source: hosted + version: "5.2.2" json_serializable: dependency: "direct dev" description: name: json_serializable - sha256: c5b2ee75210a0f263c6c7b9eeea80553dbae96ea1bf57f02484e806a3ffdffa3 + sha256: "93fba3ad139dab2b1ce59ecc6fdce6da46a42cdb6c4399ecda30f1e7e725760d" url: "https://pub.dev" source: hosted - version: "6.11.2" + version: "6.12.0" leak_tracker: dependency: transitive description: @@ -658,10 +682,10 @@ packages: dependency: transitive description: name: lints - sha256: a5e2b223cb7c9c8efdc663ef484fdd95bb243bff242ef5b13e26883547fce9a0 + sha256: "12f842a479589fea194fe5c5a3095abc7be0c1f2ddfa9a0e76aed1dbd26a87df" url: "https://pub.dev" source: hosted - version: "6.0.0" + version: "6.1.0" logging: dependency: transitive description: @@ -702,6 +726,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.0" + native_toolchain_c: + dependency: transitive + description: + name: native_toolchain_c + sha256: "89e83885ba09da5fdf2cdacc8002a712ca238c28b7f717910b34bcd27b0d03ac" + url: "https://pub.dev" + source: hosted + version: "0.17.4" node_preamble: dependency: transitive description: @@ -718,6 +750,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.5" + objective_c: + dependency: transitive + description: + name: objective_c + sha256: "100a1c87616ab6ed41ec263b083c0ef3261ee6cd1dc3b0f35f8ddfa4f996fe52" + url: "https://pub.dev" + source: hosted + version: "9.3.0" package_config: dependency: transitive description: @@ -770,10 +810,10 @@ packages: dependency: transitive description: name: path_provider_foundation - sha256: "6d13aece7b3f5c5a9731eaf553ff9dcbc2eff41087fd2df587fd0fed9a3eb0c4" + sha256: "2a376b7d6392d80cd3705782d2caa734ca4727776db0b6ec36ef3f1855197699" url: "https://pub.dev" source: hosted - version: "2.5.1" + version: "2.6.0" path_provider_linux: dependency: transitive description: @@ -810,10 +850,10 @@ packages: dependency: "direct dev" description: name: pigeon - sha256: "5480e09d2c3b1df269798ce5b2b73ae6469c4f6789d7d27ca610cb9c77b98246" + sha256: b12f739047654cd65338dc7e9c6c03cbd4a1de179364a45c9e8bbeccf23729c6 url: "https://pub.dev" source: hosted - version: "26.1.2" + version: "26.1.7" platform: dependency: transitive description: @@ -870,6 +910,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.0" + quiver: + dependency: transitive + description: + name: quiver + sha256: ea0b925899e64ecdfbf9c7becb60d5b50e706ade44a85b2363be2a22d88117d2 + url: "https://pub.dev" + source: hosted + version: "3.2.2" recase: dependency: transitive description: @@ -878,6 +926,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.1.0" + rfc_6901: + dependency: transitive + description: + name: rfc_6901 + sha256: "6a43b1858dca2febaf93e15639aa6b0c49ccdfd7647775f15a499f872b018154" + url: "https://pub.dev" + source: hosted + version: "0.2.1" share_plus: dependency: "direct main" description: @@ -935,18 +991,18 @@ packages: dependency: transitive description: name: source_gen - sha256: "07b277b67e0096c45196cbddddf2d8c6ffc49342e88bf31d460ce04605ddac75" + sha256: "1d562a3c1f713904ebbed50d2760217fd8a51ca170ac4b05b0db490699dbac17" url: "https://pub.dev" source: hosted - version: "4.1.1" + version: "4.2.0" source_helper: dependency: transitive description: name: source_helper - sha256: "6a3c6cc82073a8797f8c4dc4572146114a39652851c157db37e964d9c7038723" + sha256: "4a85e90b50694e652075cbe4575665539d253e6ec10e46e76b45368ab5e3caae" url: "https://pub.dev" source: hosted - version: "1.3.8" + version: "1.3.10" source_map_stack_trace: dependency: transitive description: @@ -967,10 +1023,10 @@ packages: dependency: transitive description: name: source_span - sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab" url: "https://pub.dev" source: hosted - version: "1.10.1" + version: "1.10.2" sqlite3: dependency: "direct main" description: @@ -983,18 +1039,18 @@ packages: dependency: "direct main" description: name: sqlite3_flutter_libs - sha256: "69c80d812ef2500202ebd22002cbfc1b6565e9ff56b2f971e757fac5d42294df" + sha256: "1e800ebe7f85a80a66adacaa6febe4d5f4d8b75f244e9838a27cb2ffc7aec08d" url: "https://pub.dev" source: hosted - version: "0.5.40" + version: "0.5.41" sqlparser: dependency: transitive description: name: sqlparser - sha256: "54eea43e36dd3769274c3108625f9ea1a382f8d2ac8b16f3e4589d9bd9b0e16c" + sha256: "337e9997f7141ffdd054259128553c348635fa318f7ca492f07a4ab76f850d19" url: "https://pub.dev" source: hosted - version: "0.42.0" + version: "0.43.1" stack_trace: dependency: "direct dev" description: @@ -1083,6 +1139,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.2" + uri: + dependency: transitive + description: + name: uri + sha256: "889eea21e953187c6099802b7b4cf5219ba8f3518f604a1033064d45b1b8268a" + url: "https://pub.dev" + source: hosted + version: "1.0.0" url_launcher: dependency: "direct main" description: @@ -1103,10 +1167,10 @@ packages: dependency: transitive description: name: url_launcher_ios - sha256: cfde38aa257dae62ffe79c87fab20165dfdf6988c1d31b58ebf59b9106062aad + sha256: b1aca26728b7cc7a3af971bb6f601554a8ae9df2e0a006de8450ba06a17ad36a url: "https://pub.dev" source: hosted - version: "6.3.6" + version: "6.4.0" url_launcher_linux: dependency: transitive description: @@ -1135,10 +1199,10 @@ packages: dependency: transitive description: name: url_launcher_web - sha256: "4bd2b7b4dc4d4d0b94e5babfffbca8eac1a126c7f3d6ecbc1a11013faa3abba2" + sha256: d0412fcf4c6b31ecfdb7762359b7206ffba3bbffd396c6d9f9c4616ece476c1f url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.2" url_launcher_windows: dependency: transitive description: @@ -1175,18 +1239,18 @@ packages: dependency: transitive description: name: video_player_android - sha256: "3f7ef3fb7b29f510e58f4d56b6ffbc3463b1071f2cf56e10f8d25f5b991ed85b" + sha256: ee4fd520b0cafa02e4a867a0f882092e727cdaa1a2d24762171e787f8a502b0a url: "https://pub.dev" source: hosted - version: "2.8.21" + version: "2.9.1" video_player_avfoundation: dependency: transitive description: name: video_player_avfoundation - sha256: e4d33b79a064498c6eb3a6a492b6a5012573d4943c28d566caf1a6c0840fe78d + sha256: f93b93a3baa12ca0ff7d00ca8bc60c1ecd96865568a01ff0c18a99853ee201a5 url: "https://pub.dev" source: hosted - version: "2.8.8" + version: "2.9.3" video_player_platform_interface: dependency: "direct dev" description: @@ -1231,10 +1295,10 @@ packages: dependency: transitive description: name: watcher - sha256: "592ab6e2892f67760543fb712ff0177f4ec76c031f02f5b4ff8d3fc5eb9fb61a" + sha256: "1398c9f081a753f9226febe8900fce8f7d0a67163334e1c94a2438339d79d635" url: "https://pub.dev" source: hosted - version: "1.1.4" + version: "1.2.1" web: dependency: transitive description: @@ -1323,5 +1387,5 @@ packages: source: path version: "0.0.1" sdks: - dart: ">=3.12.0-72.0.dev <4.0.0" - flutter: ">=3.41.0-1.0.pre-283" + dart: ">=3.12.0-128.0.dev <4.0.0" + flutter: ">=3.42.0-1.0.pre-36" diff --git a/pubspec.yaml b/pubspec.yaml index 780d9f5902..30b6aa7497 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,8 +14,8 @@ environment: # We use a recent version of Flutter from its main channel, and # the corresponding recent version of the Dart SDK. # Feel free to update these regularly; see README.md for instructions. - sdk: '>=3.12.0-72.0.dev <4.0.0' - flutter: '>=3.41.0-1.0.pre-283' # 055f3e5bf58354cb50eb55f7e35d03d8e15a6f07 + sdk: '>=3.12.0-128.0.dev <4.0.0' + flutter: '>=3.42.0-1.0.pre-36' # f3a64931b166cb42b822c3f51d89a7f95f277e7d # To update dependencies, see instructions in README.md. dependencies: @@ -35,7 +35,7 @@ dependencies: # https://github.com/dart-lang/i18n/issues/759#issuecomment-1864316701 # https://github.com/flutter/flutter/issues/117163 - app_settings: ^6.1.1 + app_settings: ^7.0.0 collection: ^1.17.2 convert: ^3.1.1 crypto: ^3.0.3 diff --git a/test/api/core_test.dart b/test/api/core_test.dart index 65ab267d14..903f35eef6 100644 --- a/test/api/core_test.dart +++ b/test/api/core_test.dart @@ -304,7 +304,7 @@ void main() { }) async { final json = { 'result': 'error', - if (code != null) 'code': code, + 'code': ?code, 'msg': message, ...data, }; diff --git a/test/model/database_test.dart b/test/model/database_test.dart index e5bed24a1b..7ee4a16155 100644 --- a/test/model/database_test.dart +++ b/test/model/database_test.dart @@ -1,7 +1,6 @@ import 'package:checks/checks.dart'; import 'package:drift/drift.dart'; import 'package:drift/native.dart'; -import 'package:drift_dev/api/migrations_common.dart' show ValidationOptions; import 'package:drift_dev/api/migrations_native.dart'; import 'package:test/scaffolding.dart'; import 'package:zulip/model/database.dart'; diff --git a/test/model/schemas/drift_schema_v12.json b/test/model/schemas/drift_schema_v12.json index ffadc0f160..5b96cf5233 100644 --- a/test/model/schemas/drift_schema_v12.json +++ b/test/model/schemas/drift_schema_v12.json @@ -1 +1,359 @@ -{"_meta":{"description":"This file contains a serialized version of schema entities for drift.","version":"1.2.0"},"options":{"store_date_time_values_as_text":false},"entities":[{"id":0,"references":[],"type":"table","data":{"name":"global_settings","was_declared_in_moor":false,"columns":[{"name":"theme_setting","getter_name":"themeSetting","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(ThemeSetting.values)","dart_type_name":"ThemeSetting"}},{"name":"browser_preference","getter_name":"browserPreference","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(BrowserPreference.values)","dart_type_name":"BrowserPreference"}},{"name":"visit_first_unread","getter_name":"visitFirstUnread","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(VisitFirstUnreadSetting.values)","dart_type_name":"VisitFirstUnreadSetting"}},{"name":"mark_read_on_scroll","getter_name":"markReadOnScroll","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(MarkReadOnScrollSetting.values)","dart_type_name":"MarkReadOnScrollSetting"}},{"name":"legacy_upgrade_state","getter_name":"legacyUpgradeState","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const EnumNameConverter(LegacyUpgradeState.values)","dart_type_name":"LegacyUpgradeState"}}],"is_virtual":false,"without_rowid":false,"constraints":[]}},{"id":1,"references":[],"type":"table","data":{"name":"bool_global_settings","was_declared_in_moor":false,"columns":[{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"value","getter_name":"value","moor_type":"bool","nullable":false,"customConstraints":null,"defaultConstraints":"CHECK (\"value\" IN (0, 1))","dialectAwareDefaultConstraints":{"sqlite":"CHECK (\"value\" IN (0, 1))"},"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["name"]}},{"id":2,"references":[],"type":"table","data":{"name":"int_global_settings","was_declared_in_moor":false,"columns":[{"name":"name","getter_name":"name","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"value","getter_name":"value","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"explicit_pk":["name"]}},{"id":3,"references":[],"type":"table","data":{"name":"accounts","was_declared_in_moor":false,"columns":[{"name":"id","getter_name":"id","moor_type":"int","nullable":false,"customConstraints":null,"defaultConstraints":"PRIMARY KEY AUTOINCREMENT","dialectAwareDefaultConstraints":{"sqlite":"PRIMARY KEY AUTOINCREMENT"},"default_dart":null,"default_client_dart":null,"dsl_features":["auto-increment"]},{"name":"realm_url","getter_name":"realmUrl","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const UriConverter()","dart_type_name":"Uri"}},{"name":"realm_name","getter_name":"realmName","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"realm_icon","getter_name":"realmIcon","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[],"type_converter":{"dart_expr":"const UriConverter()","dart_type_name":"Uri"}},{"name":"user_id","getter_name":"userId","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"email","getter_name":"email","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"api_key","getter_name":"apiKey","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"zulip_version","getter_name":"zulipVersion","moor_type":"string","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"zulip_merge_base","getter_name":"zulipMergeBase","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"zulip_feature_level","getter_name":"zulipFeatureLevel","moor_type":"int","nullable":false,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]},{"name":"acked_push_token","getter_name":"ackedPushToken","moor_type":"string","nullable":true,"customConstraints":null,"default_dart":null,"default_client_dart":null,"dsl_features":[]}],"is_virtual":false,"without_rowid":false,"constraints":[],"unique_keys":[["realm_url","user_id"],["realm_url","email"]]}}]} \ No newline at end of file +{ + "_meta": { + "description": "This file contains a serialized version of schema entities for drift.", + "version": "1.3.0" + }, + "options": { + "store_date_time_values_as_text": false + }, + "entities": [ + { + "id": 0, + "references": [], + "type": "table", + "data": { + "name": "global_settings", + "was_declared_in_moor": false, + "columns": [ + { + "name": "theme_setting", + "getter_name": "themeSetting", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumNameConverter(ThemeSetting.values)", + "dart_type_name": "ThemeSetting" + } + }, + { + "name": "browser_preference", + "getter_name": "browserPreference", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumNameConverter(BrowserPreference.values)", + "dart_type_name": "BrowserPreference" + } + }, + { + "name": "visit_first_unread", + "getter_name": "visitFirstUnread", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumNameConverter(VisitFirstUnreadSetting.values)", + "dart_type_name": "VisitFirstUnreadSetting" + } + }, + { + "name": "mark_read_on_scroll", + "getter_name": "markReadOnScroll", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumNameConverter(MarkReadOnScrollSetting.values)", + "dart_type_name": "MarkReadOnScrollSetting" + } + }, + { + "name": "legacy_upgrade_state", + "getter_name": "legacyUpgradeState", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const EnumNameConverter(LegacyUpgradeState.values)", + "dart_type_name": "LegacyUpgradeState" + } + } + ], + "is_virtual": false, + "without_rowid": false, + "constraints": [] + } + }, + { + "id": 1, + "references": [], + "type": "table", + "data": { + "name": "bool_global_settings", + "was_declared_in_moor": false, + "columns": [ + { + "name": "name", + "getter_name": "name", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "value", + "getter_name": "value", + "moor_type": "bool", + "nullable": false, + "customConstraints": null, + "defaultConstraints": "CHECK (\"value\" IN (0, 1))", + "dialectAwareDefaultConstraints": { + "sqlite": "CHECK (\"value\" IN (0, 1))" + }, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + } + ], + "is_virtual": false, + "without_rowid": false, + "constraints": [], + "explicit_pk": [ + "name" + ] + } + }, + { + "id": 2, + "references": [], + "type": "table", + "data": { + "name": "int_global_settings", + "was_declared_in_moor": false, + "columns": [ + { + "name": "name", + "getter_name": "name", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "value", + "getter_name": "value", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + } + ], + "is_virtual": false, + "without_rowid": false, + "constraints": [], + "explicit_pk": [ + "name" + ] + } + }, + { + "id": 3, + "references": [], + "type": "table", + "data": { + "name": "accounts", + "was_declared_in_moor": false, + "columns": [ + { + "name": "id", + "getter_name": "id", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "defaultConstraints": "PRIMARY KEY AUTOINCREMENT", + "dialectAwareDefaultConstraints": { + "sqlite": "PRIMARY KEY AUTOINCREMENT" + }, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [ + "auto-increment" + ] + }, + { + "name": "realm_url", + "getter_name": "realmUrl", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const UriConverter()", + "dart_type_name": "Uri" + } + }, + { + "name": "realm_name", + "getter_name": "realmName", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "realm_icon", + "getter_name": "realmIcon", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [], + "type_converter": { + "dart_expr": "const UriConverter()", + "dart_type_name": "Uri" + } + }, + { + "name": "user_id", + "getter_name": "userId", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "email", + "getter_name": "email", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "api_key", + "getter_name": "apiKey", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "zulip_version", + "getter_name": "zulipVersion", + "moor_type": "string", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "zulip_merge_base", + "getter_name": "zulipMergeBase", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "zulip_feature_level", + "getter_name": "zulipFeatureLevel", + "moor_type": "int", + "nullable": false, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + }, + { + "name": "acked_push_token", + "getter_name": "ackedPushToken", + "moor_type": "string", + "nullable": true, + "customConstraints": null, + "default_dart": null, + "default_client_dart": null, + "dsl_features": [] + } + ], + "is_virtual": false, + "without_rowid": false, + "constraints": [], + "unique_keys": [ + [ + "realm_url", + "user_id" + ], + [ + "realm_url", + "email" + ] + ] + } + } + ], + "fixed_sql": [ + { + "name": "global_settings", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"global_settings\" (\"theme_setting\" TEXT NULL, \"browser_preference\" TEXT NULL, \"visit_first_unread\" TEXT NULL, \"mark_read_on_scroll\" TEXT NULL, \"legacy_upgrade_state\" TEXT NULL);" + } + ] + }, + { + "name": "bool_global_settings", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"bool_global_settings\" (\"name\" TEXT NOT NULL, \"value\" INTEGER NOT NULL CHECK (\"value\" IN (0, 1)), PRIMARY KEY (\"name\"));" + } + ] + }, + { + "name": "int_global_settings", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"int_global_settings\" (\"name\" TEXT NOT NULL, \"value\" INTEGER NOT NULL, PRIMARY KEY (\"name\"));" + } + ] + }, + { + "name": "accounts", + "sql": [ + { + "dialect": "sqlite", + "sql": "CREATE TABLE IF NOT EXISTS \"accounts\" (\"id\" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, \"realm_url\" TEXT NOT NULL, \"realm_name\" TEXT NULL, \"realm_icon\" TEXT NULL, \"user_id\" INTEGER NOT NULL, \"email\" TEXT NOT NULL, \"api_key\" TEXT NOT NULL, \"zulip_version\" TEXT NOT NULL, \"zulip_merge_base\" TEXT NULL, \"zulip_feature_level\" INTEGER NOT NULL, \"acked_push_token\" TEXT NULL, UNIQUE (\"realm_url\", \"user_id\"), UNIQUE (\"realm_url\", \"email\"));" + } + ] + } + ] +} \ No newline at end of file diff --git a/test/model/schemas/schema.dart b/test/model/schemas/schema.dart index 073a86078f..49f49d7b02 100644 --- a/test/model/schemas/schema.dart +++ b/test/model/schemas/schema.dart @@ -1,6 +1,7 @@ // dart format width=80 -// GENERATED CODE, DO NOT EDIT BY HAND. -// ignore_for_file: type=lint +// GENERATED BY drift_dev, DO NOT MODIFY. +// ignore_for_file: type=lint,unused_import +// import 'package:drift/drift.dart'; import 'package:drift/internal/migrations.dart'; import 'schema_v1.dart' as v1; diff --git a/test/model/schemas/schema_v1.dart b/test/model/schemas/schema_v1.dart index 9629b868f7..cdd73a512d 100644 --- a/test/model/schemas/schema_v1.dart +++ b/test/model/schemas/schema_v1.dart @@ -1,6 +1,7 @@ // dart format width=80 -// GENERATED CODE, DO NOT EDIT BY HAND. -// ignore_for_file: type=lint +// GENERATED BY drift_dev, DO NOT MODIFY. +// ignore_for_file: type=lint,unused_import +// import 'package:drift/drift.dart'; class Accounts extends Table with TableInfo { diff --git a/test/model/schemas/schema_v10.dart b/test/model/schemas/schema_v10.dart index 4de2d2b356..892ec1c4c2 100644 --- a/test/model/schemas/schema_v10.dart +++ b/test/model/schemas/schema_v10.dart @@ -1,6 +1,7 @@ // dart format width=80 -// GENERATED CODE, DO NOT EDIT BY HAND. -// ignore_for_file: type=lint +// GENERATED BY drift_dev, DO NOT MODIFY. +// ignore_for_file: type=lint,unused_import +// import 'package:drift/drift.dart'; class GlobalSettings extends Table diff --git a/test/model/schemas/schema_v11.dart b/test/model/schemas/schema_v11.dart index 09a1f10fb7..04bcd9bae6 100644 --- a/test/model/schemas/schema_v11.dart +++ b/test/model/schemas/schema_v11.dart @@ -1,6 +1,7 @@ // dart format width=80 -// GENERATED CODE, DO NOT EDIT BY HAND. -// ignore_for_file: type=lint +// GENERATED BY drift_dev, DO NOT MODIFY. +// ignore_for_file: type=lint,unused_import +// import 'package:drift/drift.dart'; class GlobalSettings extends Table diff --git a/test/model/schemas/schema_v12.dart b/test/model/schemas/schema_v12.dart index 91775cbad3..b5fda8aa96 100644 --- a/test/model/schemas/schema_v12.dart +++ b/test/model/schemas/schema_v12.dart @@ -1,6 +1,7 @@ // dart format width=80 -// GENERATED CODE, DO NOT EDIT BY HAND. -// ignore_for_file: type=lint +// GENERATED BY drift_dev, DO NOT MODIFY. +// ignore_for_file: type=lint,unused_import +// import 'package:drift/drift.dart'; class GlobalSettings extends Table @@ -15,6 +16,7 @@ class GlobalSettings extends Table true, type: DriftSqlType.string, requiredDuringInsert: false, + $customConstraints: 'NULL', ); late final GeneratedColumn browserPreference = GeneratedColumn( @@ -23,6 +25,7 @@ class GlobalSettings extends Table true, type: DriftSqlType.string, requiredDuringInsert: false, + $customConstraints: 'NULL', ); late final GeneratedColumn visitFirstUnread = GeneratedColumn( 'visit_first_unread', @@ -30,6 +33,7 @@ class GlobalSettings extends Table true, type: DriftSqlType.string, requiredDuringInsert: false, + $customConstraints: 'NULL', ); late final GeneratedColumn markReadOnScroll = GeneratedColumn( 'mark_read_on_scroll', @@ -37,6 +41,7 @@ class GlobalSettings extends Table true, type: DriftSqlType.string, requiredDuringInsert: false, + $customConstraints: 'NULL', ); late final GeneratedColumn legacyUpgradeState = GeneratedColumn( @@ -45,6 +50,7 @@ class GlobalSettings extends Table true, type: DriftSqlType.string, requiredDuringInsert: false, + $customConstraints: 'NULL', ); @override List get $columns => [ @@ -92,6 +98,9 @@ class GlobalSettings extends Table GlobalSettings createAlias(String alias) { return GlobalSettings(attachedDatabase, alias); } + + @override + bool get dontWriteConstraints => true; } class GlobalSettingsData extends DataClass @@ -360,16 +369,15 @@ class BoolGlobalSettings extends Table false, type: DriftSqlType.string, requiredDuringInsert: true, + $customConstraints: 'NOT NULL', ); - late final GeneratedColumn value = GeneratedColumn( + late final GeneratedColumn value = GeneratedColumn( 'value', aliasedName, false, - type: DriftSqlType.bool, + type: DriftSqlType.int, requiredDuringInsert: true, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'CHECK ("value" IN (0, 1))', - ), + $customConstraints: 'NOT NULL CHECK (value IN (0, 1))', ); @override List get $columns => [name, value]; @@ -389,7 +397,7 @@ class BoolGlobalSettings extends Table data['${effectivePrefix}name'], )!, value: attachedDatabase.typeMapping.read( - DriftSqlType.bool, + DriftSqlType.int, data['${effectivePrefix}value'], )!, ); @@ -399,18 +407,23 @@ class BoolGlobalSettings extends Table BoolGlobalSettings createAlias(String alias) { return BoolGlobalSettings(attachedDatabase, alias); } + + @override + List get customConstraints => const ['PRIMARY KEY(name)']; + @override + bool get dontWriteConstraints => true; } class BoolGlobalSettingsData extends DataClass implements Insertable { final String name; - final bool value; + final int value; const BoolGlobalSettingsData({required this.name, required this.value}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['name'] = Variable(name); - map['value'] = Variable(value); + map['value'] = Variable(value); return map; } @@ -425,7 +438,7 @@ class BoolGlobalSettingsData extends DataClass serializer ??= driftRuntimeOptions.defaultSerializer; return BoolGlobalSettingsData( name: serializer.fromJson(json['name']), - value: serializer.fromJson(json['value']), + value: serializer.fromJson(json['value']), ); } @override @@ -433,11 +446,11 @@ class BoolGlobalSettingsData extends DataClass serializer ??= driftRuntimeOptions.defaultSerializer; return { 'name': serializer.toJson(name), - 'value': serializer.toJson(value), + 'value': serializer.toJson(value), }; } - BoolGlobalSettingsData copyWith({String? name, bool? value}) => + BoolGlobalSettingsData copyWith({String? name, int? value}) => BoolGlobalSettingsData( name: name ?? this.name, value: value ?? this.value, @@ -471,7 +484,7 @@ class BoolGlobalSettingsData extends DataClass class BoolGlobalSettingsCompanion extends UpdateCompanion { final Value name; - final Value value; + final Value value; final Value rowid; const BoolGlobalSettingsCompanion({ this.name = const Value.absent(), @@ -480,13 +493,13 @@ class BoolGlobalSettingsCompanion }); BoolGlobalSettingsCompanion.insert({ required String name, - required bool value, + required int value, this.rowid = const Value.absent(), }) : name = Value(name), value = Value(value); static Insertable custom({ Expression? name, - Expression? value, + Expression? value, Expression? rowid, }) { return RawValuesInsertable({ @@ -498,7 +511,7 @@ class BoolGlobalSettingsCompanion BoolGlobalSettingsCompanion copyWith({ Value? name, - Value? value, + Value? value, Value? rowid, }) { return BoolGlobalSettingsCompanion( @@ -515,7 +528,7 @@ class BoolGlobalSettingsCompanion map['name'] = Variable(name.value); } if (value.present) { - map['value'] = Variable(value.value); + map['value'] = Variable(value.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); @@ -546,6 +559,7 @@ class IntGlobalSettings extends Table false, type: DriftSqlType.string, requiredDuringInsert: true, + $customConstraints: 'NOT NULL', ); late final GeneratedColumn value = GeneratedColumn( 'value', @@ -553,6 +567,7 @@ class IntGlobalSettings extends Table false, type: DriftSqlType.int, requiredDuringInsert: true, + $customConstraints: 'NOT NULL', ); @override List get $columns => [name, value]; @@ -582,6 +597,11 @@ class IntGlobalSettings extends Table IntGlobalSettings createAlias(String alias) { return IntGlobalSettings(attachedDatabase, alias); } + + @override + List get customConstraints => const ['PRIMARY KEY(name)']; + @override + bool get dontWriteConstraints => true; } class IntGlobalSettingsData extends DataClass @@ -729,9 +749,7 @@ class Accounts extends Table with TableInfo { hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, - defaultConstraints: GeneratedColumn.constraintIsAlways( - 'PRIMARY KEY AUTOINCREMENT', - ), + $customConstraints: 'NOT NULL PRIMARY KEY AUTOINCREMENT', ); late final GeneratedColumn realmUrl = GeneratedColumn( 'realm_url', @@ -739,6 +757,7 @@ class Accounts extends Table with TableInfo { false, type: DriftSqlType.string, requiredDuringInsert: true, + $customConstraints: 'NOT NULL', ); late final GeneratedColumn realmName = GeneratedColumn( 'realm_name', @@ -746,6 +765,7 @@ class Accounts extends Table with TableInfo { true, type: DriftSqlType.string, requiredDuringInsert: false, + $customConstraints: 'NULL', ); late final GeneratedColumn realmIcon = GeneratedColumn( 'realm_icon', @@ -753,6 +773,7 @@ class Accounts extends Table with TableInfo { true, type: DriftSqlType.string, requiredDuringInsert: false, + $customConstraints: 'NULL', ); late final GeneratedColumn userId = GeneratedColumn( 'user_id', @@ -760,6 +781,7 @@ class Accounts extends Table with TableInfo { false, type: DriftSqlType.int, requiredDuringInsert: true, + $customConstraints: 'NOT NULL', ); late final GeneratedColumn email = GeneratedColumn( 'email', @@ -767,6 +789,7 @@ class Accounts extends Table with TableInfo { false, type: DriftSqlType.string, requiredDuringInsert: true, + $customConstraints: 'NOT NULL', ); late final GeneratedColumn apiKey = GeneratedColumn( 'api_key', @@ -774,6 +797,7 @@ class Accounts extends Table with TableInfo { false, type: DriftSqlType.string, requiredDuringInsert: true, + $customConstraints: 'NOT NULL', ); late final GeneratedColumn zulipVersion = GeneratedColumn( 'zulip_version', @@ -781,6 +805,7 @@ class Accounts extends Table with TableInfo { false, type: DriftSqlType.string, requiredDuringInsert: true, + $customConstraints: 'NOT NULL', ); late final GeneratedColumn zulipMergeBase = GeneratedColumn( 'zulip_merge_base', @@ -788,6 +813,7 @@ class Accounts extends Table with TableInfo { true, type: DriftSqlType.string, requiredDuringInsert: false, + $customConstraints: 'NULL', ); late final GeneratedColumn zulipFeatureLevel = GeneratedColumn( 'zulip_feature_level', @@ -795,6 +821,7 @@ class Accounts extends Table with TableInfo { false, type: DriftSqlType.int, requiredDuringInsert: true, + $customConstraints: 'NOT NULL', ); late final GeneratedColumn ackedPushToken = GeneratedColumn( 'acked_push_token', @@ -802,6 +829,7 @@ class Accounts extends Table with TableInfo { true, type: DriftSqlType.string, requiredDuringInsert: false, + $customConstraints: 'NULL', ); @override List get $columns => [ @@ -884,6 +912,14 @@ class Accounts extends Table with TableInfo { Accounts createAlias(String alias) { return Accounts(attachedDatabase, alias); } + + @override + List get customConstraints => const [ + 'UNIQUE(realm_url, user_id)', + 'UNIQUE(realm_url, email)', + ]; + @override + bool get dontWriteConstraints => true; } class AccountsData extends DataClass implements Insertable { diff --git a/test/model/schemas/schema_v2.dart b/test/model/schemas/schema_v2.dart index 61c69dd90c..726212d131 100644 --- a/test/model/schemas/schema_v2.dart +++ b/test/model/schemas/schema_v2.dart @@ -1,6 +1,7 @@ // dart format width=80 -// GENERATED CODE, DO NOT EDIT BY HAND. -// ignore_for_file: type=lint +// GENERATED BY drift_dev, DO NOT MODIFY. +// ignore_for_file: type=lint,unused_import +// import 'package:drift/drift.dart'; class Accounts extends Table with TableInfo { diff --git a/test/model/schemas/schema_v3.dart b/test/model/schemas/schema_v3.dart index 862ea42c18..1929f0b91a 100644 --- a/test/model/schemas/schema_v3.dart +++ b/test/model/schemas/schema_v3.dart @@ -1,6 +1,7 @@ // dart format width=80 -// GENERATED CODE, DO NOT EDIT BY HAND. -// ignore_for_file: type=lint +// GENERATED BY drift_dev, DO NOT MODIFY. +// ignore_for_file: type=lint,unused_import +// import 'package:drift/drift.dart'; class GlobalSettings extends Table diff --git a/test/model/schemas/schema_v4.dart b/test/model/schemas/schema_v4.dart index 631d37ab82..9ba22302ad 100644 --- a/test/model/schemas/schema_v4.dart +++ b/test/model/schemas/schema_v4.dart @@ -1,6 +1,7 @@ // dart format width=80 -// GENERATED CODE, DO NOT EDIT BY HAND. -// ignore_for_file: type=lint +// GENERATED BY drift_dev, DO NOT MODIFY. +// ignore_for_file: type=lint,unused_import +// import 'package:drift/drift.dart'; class GlobalSettings extends Table diff --git a/test/model/schemas/schema_v5.dart b/test/model/schemas/schema_v5.dart index 1d3bc4d895..b209428526 100644 --- a/test/model/schemas/schema_v5.dart +++ b/test/model/schemas/schema_v5.dart @@ -1,6 +1,7 @@ // dart format width=80 -// GENERATED CODE, DO NOT EDIT BY HAND. -// ignore_for_file: type=lint +// GENERATED BY drift_dev, DO NOT MODIFY. +// ignore_for_file: type=lint,unused_import +// import 'package:drift/drift.dart'; class GlobalSettings extends Table diff --git a/test/model/schemas/schema_v6.dart b/test/model/schemas/schema_v6.dart index aac90f3ae3..3006a19484 100644 --- a/test/model/schemas/schema_v6.dart +++ b/test/model/schemas/schema_v6.dart @@ -1,6 +1,7 @@ // dart format width=80 -// GENERATED CODE, DO NOT EDIT BY HAND. -// ignore_for_file: type=lint +// GENERATED BY drift_dev, DO NOT MODIFY. +// ignore_for_file: type=lint,unused_import +// import 'package:drift/drift.dart'; class GlobalSettings extends Table diff --git a/test/model/schemas/schema_v7.dart b/test/model/schemas/schema_v7.dart index b74f391386..b1d16881bb 100644 --- a/test/model/schemas/schema_v7.dart +++ b/test/model/schemas/schema_v7.dart @@ -1,6 +1,7 @@ // dart format width=80 -// GENERATED CODE, DO NOT EDIT BY HAND. -// ignore_for_file: type=lint +// GENERATED BY drift_dev, DO NOT MODIFY. +// ignore_for_file: type=lint,unused_import +// import 'package:drift/drift.dart'; class GlobalSettings extends Table diff --git a/test/model/schemas/schema_v8.dart b/test/model/schemas/schema_v8.dart index fb17863b15..aa7226be45 100644 --- a/test/model/schemas/schema_v8.dart +++ b/test/model/schemas/schema_v8.dart @@ -1,6 +1,7 @@ // dart format width=80 -// GENERATED CODE, DO NOT EDIT BY HAND. -// ignore_for_file: type=lint +// GENERATED BY drift_dev, DO NOT MODIFY. +// ignore_for_file: type=lint,unused_import +// import 'package:drift/drift.dart'; class GlobalSettings extends Table diff --git a/test/model/schemas/schema_v9.dart b/test/model/schemas/schema_v9.dart index d036e3a26f..30393941f0 100644 --- a/test/model/schemas/schema_v9.dart +++ b/test/model/schemas/schema_v9.dart @@ -1,6 +1,7 @@ // dart format width=80 -// GENERATED CODE, DO NOT EDIT BY HAND. -// ignore_for_file: type=lint +// GENERATED BY drift_dev, DO NOT MODIFY. +// ignore_for_file: type=lint,unused_import +// import 'package:drift/drift.dart'; class GlobalSettings extends Table diff --git a/test/model/settings_test.dart b/test/model/settings_test.dart index 3e5142914b..abf4c75662 100644 --- a/test/model/settings_test.dart +++ b/test/model/settings_test.dart @@ -129,7 +129,7 @@ void main() { group('set avoids redundant updates', () { void checkUpdated(bool? old, bool? new_, {required bool expected}) async { final globalSettings = eg.globalStore(boolGlobalSettings: { - if (old != null) BoolGlobalSetting.placeholderIgnore: old, + BoolGlobalSetting.placeholderIgnore: ?old, }).settings; bool updated = false; @@ -203,7 +203,7 @@ void main() { group('set avoids redundant updates', () { void checkUpdated(int? old, int? new_, {required bool expected}) async { final globalSettings = eg.globalStore(intGlobalSettings: { - if (old != null) IntGlobalSetting.placeholderIgnore: old, + IntGlobalSetting.placeholderIgnore: ?old, }).settings; bool updated = false; diff --git a/test/notifications/display_test.dart b/test/notifications/display_test.dart index 29319d8eaf..ea596cde72 100644 --- a/test/notifications/display_test.dart +++ b/test/notifications/display_test.dart @@ -53,7 +53,7 @@ MessageFcmMessage messageFcmMessage( TopicNarrow(:var streamId, :var topic) => { "recipient_type": "stream", "stream_id": streamId.toString(), - if (streamName != null) "stream": streamName, + "stream": ?streamName, "topic": topic, }, DmNarrow(allRecipientIds: [_, _, _, ...]) => { diff --git a/test/notifications/open_test.dart b/test/notifications/open_test.dart index ccecf63b99..3dfb1c019d 100644 --- a/test/notifications/open_test.dart +++ b/test/notifications/open_test.dart @@ -64,7 +64,7 @@ Map messageApnsPayload( StreamMessage(:var streamId, :var topic) => { "recipient_type": "stream", "stream_id": streamId, - if (streamName != null) "stream": streamName, + "stream": ?streamName, "topic": topic, }, DmMessage(allRecipientIds: [_, _, _, ...]) => { diff --git a/test/widgets/inbox_test.dart b/test/widgets/inbox_test.dart index 294770732a..192ccc839b 100644 --- a/test/widgets/inbox_test.dart +++ b/test/widgets/inbox_test.dart @@ -78,7 +78,7 @@ void main() { await tester.pumpWidget(TestZulipApp( accountId: eg.selfAccount.id, - navigatorObservers: [if (navigatorObserver != null) navigatorObserver], + navigatorObservers: [?navigatorObserver], child: const HomePage(), )); await tester.pump(); diff --git a/test/widgets/sticky_header_test.dart b/test/widgets/sticky_header_test.dart index ac7ae4819a..71fa18b44f 100644 --- a/test/widgets/sticky_header_test.dart +++ b/test/widgets/sticky_header_test.dart @@ -496,7 +496,7 @@ abstract class _SelectItemFinder extends FinderBase with ChainedFinderM resultWidget = widget; } } - return [if (result != null) result]; + return [?result]; } }