From e2d4fd2c0dcb2b9703525b6f75fd7daab3dc6d2b Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Mon, 23 Dec 2024 13:25:55 +0100 Subject: [PATCH] feat(repo): bump min flutter version to 3.24.5 (#2068) --- .github/actions/pana/action.yml | 48 +++ ...e__temporarily_override_dep_to_local.patch | 79 ++++ .github/workflows/legacy_version_analyze.yml | 6 +- .github/workflows/pana.yml | 129 ++----- .github/workflows/stream_flutter_workflow.yml | 12 +- .gitignore | 3 + melos.yaml | 85 ++++- packages/stream_chat/CHANGELOG.md | 4 + packages/stream_chat/example/pubspec.yaml | 20 +- .../lib/src/core/api/responses.dart | 2 +- .../lib/src/core/api/responses.g.dart | 8 - packages/stream_chat/pubspec.yaml | 16 +- packages/stream_chat/test/src/matchers.dart | 4 +- packages/stream_chat_flutter/CHANGELOG.md | 4 + .../example/lib/tutorial_part_3.dart | 1 + .../stream_chat_flutter/example/pubspec.yaml | 26 +- .../src/item_positions_listener.dart | 14 +- .../src/positioned_list.dart | 1 + .../src/scrollable_positioned_list.dart | 1 + .../attachment_upload_state_builder.dart | 1 + .../builder/attachment_widget_builder.dart | 1 - .../voice_recording_attachment_builder.dart | 5 +- .../stream_command_autocomplete_options.dart | 1 + .../lib/src/avatars/gradient_avatar.dart | 1 + .../src/bottom_sheets/error_alert_sheet.dart | 1 + .../lib/src/channel/channel_info.dart | 2 - .../lib/src/channel/channel_list_header.dart | 2 - .../lib/src/gallery/gallery_footer.dart | 2 + .../indicators/upload_progress_indicator.dart | 1 + .../clear_input_item_button.dart | 1 + .../lib/src/message_input/dm_checkbox.dart | 1 + .../message_input/stream_message_input.dart | 1 + .../stream_message_input_attachment_list.dart | 1 + .../message_list_view/loading_indicator.dart | 1 + .../message_list_view/message_list_view.dart | 3 + .../giphy_ephemeral_message.dart | 1 + .../src/message_widget/message_widget.dart | 1 + .../lib/src/misc/info_tile.dart | 1 + .../poll_option_reorderable_list_view.dart | 4 +- .../stream_channel_list_tile.dart | 10 +- .../stream_channel_list_view.dart | 1 + .../stream_message_search_list_view.dart | 1 + .../stream_photo_gallery_tile.dart | 1 + .../stream_scroll_view_load_more_error.dart | 1 + .../stream_user_list_tile.dart | 1 + .../stream_user_list_view.dart | 1 + .../lib/src/theme/stream_chat_theme.dart | 1 + .../lib/src/utils/helpers.dart | 5 + packages/stream_chat_flutter/pubspec.yaml | 56 +-- .../src/message_input/dm_checkbox_test.dart | 3 + .../test/src/theme/avatar_theme_test.dart | 13 +- .../src/theme/channel_header_theme_test.dart | 13 +- .../theme/channel_list_header_theme_test.dart | 15 +- .../src/theme/channel_preview_theme_test.dart | 18 +- .../src/theme/gallery_footer_theme_test.dart | 15 +- .../src/theme/gallery_header_theme_test.dart | 15 +- .../src/theme/message_input_theme_test.dart | 13 +- .../theme/message_list_view_theme_test.dart | 15 +- .../stream_chat_flutter_core/CHANGELOG.md | 4 + .../example/pubspec.yaml | 18 +- .../lib/src/stream_channel.dart | 8 +- .../stream_chat_flutter_core/pubspec.yaml | 18 +- .../test/stream_poll_controller_test.dart | 15 +- .../stream_chat_localizations/CHANGELOG.md | 1 + .../example/pubspec.yaml | 20 +- .../stream_chat_localizations/pubspec.yaml | 34 +- packages/stream_chat_persistence/CHANGELOG.md | 4 + .../example/pubspec.yaml | 20 +- .../lib/src/db/drift_chat_database.g.dart | 15 +- packages/stream_chat_persistence/pubspec.yaml | 23 +- pubspec.lock | 341 ++++++++++++++++++ pubspec.yaml | 4 +- 72 files changed, 947 insertions(+), 271 deletions(-) create mode 100644 .github/actions/pana/action.yml create mode 100644 .github/actions/pana/chore__temporarily_override_dep_to_local.patch create mode 100644 pubspec.lock diff --git a/.github/actions/pana/action.yml b/.github/actions/pana/action.yml new file mode 100644 index 000000000..c8a90f601 --- /dev/null +++ b/.github/actions/pana/action.yml @@ -0,0 +1,48 @@ +name: Pana Workflow + +inputs: + min_score: + required: false + type: number + default: 120 + pana_version: + required: false + type: string + runs_on: + required: false + type: string + default: "ubuntu-latest" + working_directory: + required: false + type: string + default: "." + +runs: + using: "composite" + steps: + - name: Temporary Override Local Dependencies + shell: bash + run: | + git apply .github/actions/pana/chore__temporarily_override_dep_to_local.patch + + - name: Install Flutter + uses: subosito/flutter-action@v2 + with: + # Forcing to 3.24.5 for right now as pana has an issue with Dart 3.6 https://github.com/dart-lang/dartdoc/issues/3947 + flutter-version: "3.24.5" + cache: true + cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} + + - name: Install Pana + working-directory: ${{ inputs.working_directory }} + shell: bash + run: flutter pub global activate pana ${{inputs.pana_version}} + + - name: Verify Pana Score + working-directory: ${{ inputs.working_directory }} + shell: bash + run: | + PANA=$(pana . --no-warning); PANA_SCORE=$(echo $PANA | sed -n "s/.*Points: \([0-9]*\)\/\([0-9]*\)./\1\/\2/p") + echo "Score: $PANA_SCORE" + IFS='/'; read -a SCORE_ARR <<< "$PANA_SCORE"; SCORE=SCORE_ARR[0]; + if (( $SCORE < ${{inputs.min_score}} )); then echo "The minimum score of ${{inputs.min_score}} was not met!"; exit 1; fi \ No newline at end of file diff --git a/.github/actions/pana/chore__temporarily_override_dep_to_local.patch b/.github/actions/pana/chore__temporarily_override_dep_to_local.patch new file mode 100644 index 000000000..143592511 --- /dev/null +++ b/.github/actions/pana/chore__temporarily_override_dep_to_local.patch @@ -0,0 +1,79 @@ +Subject: [PATCH] chore: temporarily override dep to local +--- +Index: packages/stream_chat_localizations/pubspec.yaml +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +diff --git a/packages/stream_chat_localizations/pubspec.yaml b/packages/stream_chat_localizations/pubspec.yaml +--- a/packages/stream_chat_localizations/pubspec.yaml (revision 5d78c24f7d7411e55fc6d1adfbe193b743abcbba) ++++ b/packages/stream_chat_localizations/pubspec.yaml (date 1734716942871) +@@ -26,7 +26,8 @@ + sdk: flutter + flutter_localizations: + sdk: flutter +- stream_chat_flutter: ^8.3.0 ++ stream_chat_flutter: ++ path: ../stream_chat_flutter + + dev_dependencies: + flutter_test: +Index: packages/stream_chat_flutter_core/pubspec.yaml +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +diff --git a/packages/stream_chat_flutter_core/pubspec.yaml b/packages/stream_chat_flutter_core/pubspec.yaml +--- a/packages/stream_chat_flutter_core/pubspec.yaml (revision 5d78c24f7d7411e55fc6d1adfbe193b743abcbba) ++++ b/packages/stream_chat_flutter_core/pubspec.yaml (date 1734716650052) +@@ -29,7 +29,8 @@ + freezed_annotation: ^2.4.1 + meta: ^1.9.1 + rxdart: ^0.28.0 +- stream_chat: ^8.3.0 ++ stream_chat: ++ path: ../stream_chat + + dev_dependencies: + build_runner: ^2.4.9 +@@ -38,4 +39,3 @@ + sdk: flutter + freezed: ^2.4.2 + mocktail: ^1.0.0 +- +Index: packages/stream_chat_flutter/pubspec.yaml +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +diff --git a/packages/stream_chat_flutter/pubspec.yaml b/packages/stream_chat_flutter/pubspec.yaml +--- a/packages/stream_chat_flutter/pubspec.yaml (revision 5d78c24f7d7411e55fc6d1adfbe193b743abcbba) ++++ b/packages/stream_chat_flutter/pubspec.yaml (date 1734716942864) +@@ -54,7 +54,8 @@ + rxdart: ^0.28.0 + share_plus: ^10.0.2 + shimmer: ^3.0.0 +- stream_chat_flutter_core: ^8.3.0 ++ stream_chat_flutter_core: ++ path: ../stream_chat_flutter_core + synchronized: ^3.1.0+1 + thumblr: ^0.0.4 + url_launcher: ^6.3.0 +Index: packages/stream_chat_persistence/pubspec.yaml +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +diff --git a/packages/stream_chat_persistence/pubspec.yaml b/packages/stream_chat_persistence/pubspec.yaml +--- a/packages/stream_chat_persistence/pubspec.yaml (revision 5d78c24f7d7411e55fc6d1adfbe193b743abcbba) ++++ b/packages/stream_chat_persistence/pubspec.yaml (date 1734717094786) +@@ -30,7 +30,8 @@ + path: ^1.8.3 + path_provider: ^2.1.3 + sqlite3_flutter_libs: ^0.5.24 +- stream_chat: ^8.3.0 ++ stream_chat: ++ path: ../stream_chat + + dev_dependencies: + build_runner: ^2.4.9 diff --git a/.github/workflows/legacy_version_analyze.yml b/.github/workflows/legacy_version_analyze.yml index 4e495a090..940a52218 100644 --- a/.github/workflows/legacy_version_analyze.yml +++ b/.github/workflows/legacy_version_analyze.yml @@ -3,7 +3,7 @@ name: legacy_version_analyze env: # Note: The versions below should be manually updated after a new stable # version comes out. - flutter_version: "3.22.3" + flutter_version: "3.24.5" on: push: @@ -42,8 +42,10 @@ jobs: - name: "Install Flutter" uses: subosito/flutter-action@v2 with: - cache: true flutter-version: ${{ env.flutter_version }} + channel: stable + cache: true + cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} - name: "Install Tools" run: flutter pub global activate melos diff --git a/.github/workflows/pana.yml b/.github/workflows/pana.yml index 903dc6554..230e88d09 100644 --- a/.github/workflows/pana.yml +++ b/.github/workflows/pana.yml @@ -1,21 +1,12 @@ name: pana -env: - ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' - flutter_channel: "stable" - flutter_version: "3.13.9" - on: pull_request: branches: - master - paths-ignore: - - 'docs/**' push: branches: - master - paths-ignore: - - 'docs/**' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -25,106 +16,54 @@ jobs: stream_chat: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: flutterings/dart-package-analyzer@v1 - id: analysis + - name: 📚 Git Checkout + uses: actions/checkout@v4 + - name: 📊 Verify Pana Score + uses: ./.github/actions/pana with: - flutter_version: ${{ env.flutter_version }} - flutter_channel: ${{ env.flutter_channel }} - relativePath: packages/stream_chat - - name: Check scores - env: - # NB: "analysis" is the id set above. Replace it with the one you used if different. - TOTAL: ${{ steps.analysis.outputs.total }} - TOTAL_MAX: ${{ steps.analysis.outputs.total_max }} - run: | - if (( $TOTAL < 120 )) - then - echo Score too low! - exit 1 - fi + working_directory: packages/stream_chat + min_score: 120 + stream_chat_persistence: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: flutterings/dart-package-analyzer@v1 - id: analysis + - name: 📚 Git Checkout + uses: actions/checkout@v4 + - name: 📊 Verify Pana Score + uses: ./.github/actions/pana with: - flutter_version: ${{ env.flutter_version }} - flutter_channel: ${{ env.flutter_channel }} - relativePath: packages/stream_chat_persistence - - name: Check scores - env: - # NB: "analysis" is the id set above. Replace it with the one you used if different. - TOTAL: ${{ steps.analysis.outputs.total }} - TOTAL_MAX: ${{ steps.analysis.outputs.total_max }} - run: | - PERCENTAGE=$(( $TOTAL * 100 / $TOTAL_MAX )) - if (( $TOTAL < 120 )) - then - echo Score too low! - exit 1 - fi + working_directory: packages/stream_chat_persistence + min_score: 120 + stream_chat_flutter_core: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: flutterings/dart-package-analyzer@v1 - id: analysis + - name: 📚 Git Checkout + uses: actions/checkout@v4 + - name: 📊 Verify Pana Score + uses: ./.github/actions/pana with: - flutter_version: ${{ env.flutter_version }} - flutter_channel: ${{ env.flutter_channel }} - relativePath: packages/stream_chat_flutter_core - - name: Check scores - env: - # NB: "analysis" is the id set above. Replace it with the one you used if different. - TOTAL: ${{ steps.analysis.outputs.total }} - TOTAL_MAX: ${{ steps.analysis.outputs.total_max }} - run: | - if (( $TOTAL < 120 )) - then - echo Score too low! - exit 1 - fi + working_directory: packages/stream_chat_flutter_core + min_score: 120 + stream_chat_flutter: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: flutterings/dart-package-analyzer@v1 - id: analysis + - name: 📚 Git Checkout + uses: actions/checkout@v4 + - name: 📊 Verify Pana Score + uses: ./.github/actions/pana with: - flutter_version: ${{ env.flutter_version }} - flutter_channel: ${{ env.flutter_channel }} - relativePath: packages/stream_chat_flutter - - name: Check scores - env: - # NB: "analysis" is the id set above. Replace it with the one you used if different. - TOTAL: ${{ steps.analysis.outputs.total }} - TOTAL_MAX: ${{ steps.analysis.outputs.total_max }} - run: | - if (( $TOTAL < 100 )) - then - echo Score too low! - exit 1 - fi + working_directory: packages/stream_chat_flutter + min_score: 120 + stream_chat_localizations: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: flutterings/dart-package-analyzer@v1 - id: analysis + - name: 📚 Git Checkout + uses: actions/checkout@v4 + - name: 📊 Verify Pana Score + uses: ./.github/actions/pana with: - flutter_version: ${{ env.flutter_version }} - flutter_channel: ${{ env.flutter_channel }} - relativePath: packages/stream_chat_localizations - - name: Check scores - env: - # NB: "analysis" is the id set above. Replace it with the one you used if different. - TOTAL: ${{ steps.analysis.outputs.total }} - TOTAL_MAX: ${{ steps.analysis.outputs.total_max }} - run: | - if (( $TOTAL < 120 )) - then - echo Score too low! - exit 1 - fi \ No newline at end of file + working_directory: packages/stream_chat_localizations + min_score: 120 \ No newline at end of file diff --git a/.github/workflows/stream_flutter_workflow.yml b/.github/workflows/stream_flutter_workflow.yml index 0e21dcd87..ed786a113 100644 --- a/.github/workflows/stream_flutter_workflow.yml +++ b/.github/workflows/stream_flutter_workflow.yml @@ -2,8 +2,7 @@ name: stream_flutter_workflow env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' - flutter_channel: "stable" - flutter_version: "3.24.3" + flutter_version: "3.x" on: pull_request: @@ -37,8 +36,9 @@ jobs: uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.flutter_version }} + channel: stable cache: true - channel: ${{ env.flutter_channel }} + cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} - name: "Install Tools" run: | flutter pub global activate melos @@ -65,8 +65,9 @@ jobs: uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.flutter_version }} + channel: stable cache: true - channel: ${{ env.flutter_channel }} + cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} - name: "Install Tools" run: | flutter pub global activate melos @@ -91,8 +92,9 @@ jobs: uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.flutter_version }} + channel: stable cache: true - channel: ${{ env.flutter_channel }} + cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }} - name: "Install Tools" run: | flutter pub global activate melos diff --git a/.gitignore b/.gitignore index c3f339539..b0f5d50ec 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,6 @@ build/ /packages/flutter_widgets/example/ios/Flutter/.last_build_id /packages/dart_client/example/ios/Flutter/.last_build_id /packages/dart_client/example/ios/Runner.xcodeproj/project.pbxproj + +# Exceptions to the above rules +!/pubspec.lock diff --git a/melos.yaml b/melos.yaml index 6b93f812f..a3854f670 100644 --- a/melos.yaml +++ b/melos.yaml @@ -4,6 +4,85 @@ repository: https://github.com/GetStream/stream-chat-flutter packages: - packages/** +command: + bootstrap: + # Dart and Flutter environment used in the project. + environment: + sdk: ^3.5.4 + # We are not using carat '^' syntax here because flutter don't follow semantic versioning. + flutter: ">=3.24.5" + + # List of all the dependencies used in the project. + dependencies: + async: ^2.11.0 + cached_network_image: ^3.3.1 + chewie: ^1.8.1 + collection: ^1.17.2 + connectivity_plus: ^6.0.3 + contextmenu: ^3.0.0 + cupertino_icons: ^1.0.3 + desktop_drop: ^0.5.0 + diacritic: ^0.1.5 + dio: ^5.4.3+1 + drift: ^2.22.1 + equatable: ^2.0.5 + ezanimation: ^0.6.0 + file_picker: ^8.0.5 + file_selector: ^1.0.3 + flutter_markdown: ^0.7.2+1 + flutter_portal: ^1.1.4 + flutter_svg: ^2.0.10+1 + freezed_annotation: ^2.4.1 + get_thumbnail_video: ^0.7.3 + http_parser: ^4.0.2 + image_gallery_saver_plus: ^3.0.5 + image_picker: ^1.1.2 + image_size_getter: ^2.1.3 + jiffy: ^6.2.1 + jose: ^0.3.4 + json_annotation: ^4.9.0 + just_audio: ^0.9.38 + logging: ^1.2.0 + lottie: ^3.1.2 + media_kit: ^1.1.10+1 + media_kit_video: ^1.2.4 + meta: ^1.9.1 + mime: ^2.0.0 + path: ^1.8.3 + path_provider: ^2.1.3 + photo_manager: ^3.2.0 + photo_view: ^0.15.0 + rate_limiter: ^1.0.0 + responsive_builder: ^0.7.0 + rxdart: ^0.28.0 + share_plus: ^10.0.2 + shimmer: ^3.0.0 + sqlite3_flutter_libs: ^0.5.24 + stream_chat: ^8.3.0 + stream_chat_flutter: ^8.3.0 + stream_chat_flutter_core: ^8.3.0 + stream_chat_localizations: ^8.3.0 + stream_chat_persistence: ^8.3.0 + synchronized: ^3.1.0+1 + thumblr: ^0.0.4 + url_launcher: ^6.3.0 + uuid: ^4.4.0 + video_player: ^2.8.7 + web_socket_channel: ^3.0.1 + + # List of all the dev_dependencies used in the project. + dev_dependencies: + build_runner: ^2.4.9 + drift_dev: ^2.22.1 + fake_async: ^1.3.1 + faker_dart: ^0.2.1 + freezed: ^2.4.2 + golden_toolkit: ^0.15.0 + json_serializable: ^6.7.1 + mocktail: ^1.0.0 + path: ^1.8.3 + test: ^1.24.6 + scripts: postclean: run: melos run clean:flutter --no-select @@ -88,9 +167,3 @@ scripts: description: Removes all the ignored files from the coverage report. packageFilters: dirExists: coverage - - docs: - run: | - npm install -g https://github.com/GetStream/stream-chat-docusaurus-cli && - npx stream-chat-docusaurus -i -s - description: Runs the docusaurus documentation locally. diff --git a/packages/stream_chat/CHANGELOG.md b/packages/stream_chat/CHANGELOG.md index 378859381..114c508b7 100644 --- a/packages/stream_chat/CHANGELOG.md +++ b/packages/stream_chat/CHANGELOG.md @@ -4,6 +4,10 @@ - Added support for Polls feature, which allows users to create and vote on polls in chat messages. +🔄 Changed + +- Updated minimum Dart version to 3.5.4 for the SDK. + ## 8.3.0 ✅ Added diff --git a/packages/stream_chat/example/pubspec.yaml b/packages/stream_chat/example/pubspec.yaml index 68d694b8c..c73a43730 100644 --- a/packages/stream_chat/example/pubspec.yaml +++ b/packages/stream_chat/example/pubspec.yaml @@ -4,15 +4,27 @@ description: A new Flutter project. publish_to: "none" version: 1.0.0+1 +# Note: The environment configuration and dependency versions are managed by Melos. +# +# Do not edit them manually. +# +# Steps to update dependencies: +# 1. Modify the version in the melos.yaml file. +# 2. Run `melos bootstrap` to apply changes. +# +# Steps to add a new dependency: +# 1. Add the dependency to this list. +# 2. Add it to the melos.yaml file for future updates. + environment: - sdk: ">=3.3.0 <4.0.0" - flutter: ">=3.19.0" + sdk: ^3.5.4 + flutter: ">=3.24.5" dependencies: - cupertino_icons: ^1.0.5 + cupertino_icons: ^1.0.3 flutter: sdk: flutter - stream_chat: ^8.0.0 + stream_chat: ^8.3.0 flutter: uses-material-design: true diff --git a/packages/stream_chat/lib/src/core/api/responses.dart b/packages/stream_chat/lib/src/core/api/responses.dart index 6c70edc3a..896a7e647 100644 --- a/packages/stream_chat/lib/src/core/api/responses.dart +++ b/packages/stream_chat/lib/src/core/api/responses.dart @@ -536,7 +536,7 @@ class CreateCallPayload extends _BaseResponse { } /// Contains information about a [User] that was banned from a [Channel] or App. -@JsonSerializable() +@JsonSerializable(createToJson: false) class UserBlockResponse extends _BaseResponse { /// User that banned the [user]. @JsonKey(defaultValue: '') diff --git a/packages/stream_chat/lib/src/core/api/responses.g.dart b/packages/stream_chat/lib/src/core/api/responses.g.dart index f07f86bd3..39046f9f0 100644 --- a/packages/stream_chat/lib/src/core/api/responses.g.dart +++ b/packages/stream_chat/lib/src/core/api/responses.g.dart @@ -321,14 +321,6 @@ UserBlockResponse _$UserBlockResponseFromJson(Map json) => ..blockedUserId = json['blocked_user_id'] as String? ?? '' ..createdAt = DateTime.parse(json['created_at'] as String); -Map _$UserBlockResponseToJson(UserBlockResponse instance) => - { - 'duration': instance.duration, - 'blocked_by_user_id': instance.blockedByUserId, - 'blocked_user_id': instance.blockedUserId, - 'created_at': instance.createdAt.toIso8601String(), - }; - BlockedUsersResponse _$BlockedUsersResponseFromJson( Map json) => BlockedUsersResponse() diff --git a/packages/stream_chat/pubspec.yaml b/packages/stream_chat/pubspec.yaml index 77bbf0d08..3bbfd3d62 100644 --- a/packages/stream_chat/pubspec.yaml +++ b/packages/stream_chat/pubspec.yaml @@ -5,8 +5,20 @@ version: 8.3.0 repository: https://github.com/GetStream/stream-chat-flutter issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues +# Note: The environment configuration and dependency versions are managed by Melos. +# +# Do not edit them manually. +# +# Steps to update dependencies: +# 1. Modify the version in the melos.yaml file. +# 2. Run `melos bootstrap` to apply changes. +# +# Steps to add a new dependency: +# 1. Add the dependency to this list. +# 2. Add it to the melos.yaml file for future updates. + environment: - sdk: '>=3.4.0 <4.0.0' + sdk: ^3.5.4 dependencies: async: ^2.11.0 @@ -19,7 +31,7 @@ dependencies: json_annotation: ^4.9.0 logging: ^1.2.0 meta: ^1.9.1 - mime: ^1.0.5 + mime: ^2.0.0 rate_limiter: ^1.0.0 rxdart: ^0.28.0 synchronized: ^3.1.0+1 diff --git a/packages/stream_chat/test/src/matchers.dart b/packages/stream_chat/test/src/matchers.dart index eeac94c35..9376c7f4d 100644 --- a/packages/stream_chat/test/src/matchers.dart +++ b/packages/stream_chat/test/src/matchers.dart @@ -120,7 +120,9 @@ class _IsSameMessageAs extends Matcher { if (!isSameAttachmentAs( attachments[i], matchUploadState: matchAttachmentsUploadState, - ).matches(targetAttachments[i], matchState)) return false; + ).matches(targetAttachments[i], matchState)) { + return false; + } } return true; } diff --git a/packages/stream_chat_flutter/CHANGELOG.md b/packages/stream_chat_flutter/CHANGELOG.md index 767217957..a52db00c7 100644 --- a/packages/stream_chat_flutter/CHANGELOG.md +++ b/packages/stream_chat_flutter/CHANGELOG.md @@ -4,6 +4,10 @@ - Added a new `StreamPollCreator` widget to facilitate poll creation within the chat interface. +🔄 Changed + +- Updated minimum Flutter version to 3.24.5 for the SDK. + ## 8.3.0 ✅ Added diff --git a/packages/stream_chat_flutter/example/lib/tutorial_part_3.dart b/packages/stream_chat_flutter/example/lib/tutorial_part_3.dart index fa42566ac..3224591b4 100644 --- a/packages/stream_chat_flutter/example/lib/tutorial_part_3.dart +++ b/packages/stream_chat_flutter/example/lib/tutorial_part_3.dart @@ -146,6 +146,7 @@ class _ChannelListPageState extends State { color: StreamChatTheme.of(context) .colorTheme .textHighEmphasis + // ignore: deprecated_member_use .withOpacity(opacity), ), channel: channel, diff --git a/packages/stream_chat_flutter/example/pubspec.yaml b/packages/stream_chat_flutter/example/pubspec.yaml index 554a87de4..d9ab81d53 100644 --- a/packages/stream_chat_flutter/example/pubspec.yaml +++ b/packages/stream_chat_flutter/example/pubspec.yaml @@ -3,19 +3,31 @@ description: A new Flutter project. publish_to: 'none' version: 1.0.0+1 +# Note: The environment configuration and dependency versions are managed by Melos. +# +# Do not edit them manually. +# +# Steps to update dependencies: +# 1. Modify the version in the melos.yaml file. +# 2. Run `melos bootstrap` to apply changes. +# +# Steps to add a new dependency: +# 1. Add the dependency to this list. +# 2. Add it to the melos.yaml file for future updates. + environment: - sdk: ">=3.3.0 <4.0.0" - flutter: ">=3.19.0" + sdk: ^3.5.4 + flutter: ">=3.24.5" dependencies: - collection: ^1.15.0 - cupertino_icons: ^1.0.4 + collection: ^1.17.2 + cupertino_icons: ^1.0.3 flutter: sdk: flutter responsive_builder: ^0.7.0 - stream_chat_flutter: ^8.0.0 - stream_chat_localizations: ^8.0.0 - stream_chat_persistence: ^8.0.0 + stream_chat_flutter: ^8.3.0 + stream_chat_localizations: ^8.3.0 + stream_chat_persistence: ^8.3.0 flutter: uses-material-design: true diff --git a/packages/stream_chat_flutter/lib/scrollable_positioned_list/src/item_positions_listener.dart b/packages/stream_chat_flutter/lib/scrollable_positioned_list/src/item_positions_listener.dart index b58aae06c..d2752a00b 100644 --- a/packages/stream_chat_flutter/lib/scrollable_positioned_list/src/item_positions_listener.dart +++ b/packages/stream_chat_flutter/lib/scrollable_positioned_list/src/item_positions_listener.dart @@ -42,13 +42,13 @@ class ItemPosition { final double itemTrailingEdge; @override - bool operator ==(dynamic other) { - if (other.runtimeType != runtimeType) return false; - final ItemPosition otherPosition = other; - return otherPosition.index == index && - otherPosition.itemLeadingEdge == itemLeadingEdge && - otherPosition.itemTrailingEdge == itemTrailingEdge; - } + bool operator ==(Object other) => + identical(this, other) || + other is ItemPosition && + runtimeType == other.runtimeType && + index == other.index && + itemLeadingEdge == other.itemLeadingEdge && + itemTrailingEdge == other.itemTrailingEdge; @override int get hashCode => diff --git a/packages/stream_chat_flutter/lib/scrollable_positioned_list/src/positioned_list.dart b/packages/stream_chat_flutter/lib/scrollable_positioned_list/src/positioned_list.dart index 1ea7733e5..df08329cf 100644 --- a/packages/stream_chat_flutter/lib/scrollable_positioned_list/src/positioned_list.dart +++ b/packages/stream_chat_flutter/lib/scrollable_positioned_list/src/positioned_list.dart @@ -98,6 +98,7 @@ class PositionedList extends StatefulWidget { /// Defaults to false. /// /// See [ScrollView.shrinkWrap]. + /// {@endtemplate} final bool shrinkWrap; /// How the scroll view should respond to user input. diff --git a/packages/stream_chat_flutter/lib/scrollable_positioned_list/src/scrollable_positioned_list.dart b/packages/stream_chat_flutter/lib/scrollable_positioned_list/src/scrollable_positioned_list.dart index b3785154c..af44d5256 100644 --- a/packages/stream_chat_flutter/lib/scrollable_positioned_list/src/scrollable_positioned_list.dart +++ b/packages/stream_chat_flutter/lib/scrollable_positioned_list/src/scrollable_positioned_list.dart @@ -125,6 +125,7 @@ class ScrollablePositionedList extends StatefulWidget { /// Defaults to false. /// /// See [ScrollView.shrinkWrap]. + /// {@endtemplate} final bool shrinkWrap; /// How the scroll view should respond to user input. diff --git a/packages/stream_chat_flutter/lib/src/attachment/attachment_upload_state_builder.dart b/packages/stream_chat_flutter/lib/src/attachment/attachment_upload_state_builder.dart index fcedd0125..13cdcf2b9 100644 --- a/packages/stream_chat_flutter/lib/src/attachment/attachment_upload_state_builder.dart +++ b/packages/stream_chat_flutter/lib/src/attachment/attachment_upload_state_builder.dart @@ -209,6 +209,7 @@ class _FailedState extends StatelessWidget { child: DecoratedBox( decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), + // ignore: deprecated_member_use color: theme.colorTheme.overlayDark.withOpacity(0.6), ), child: Padding( diff --git a/packages/stream_chat_flutter/lib/src/attachment/builder/attachment_widget_builder.dart b/packages/stream_chat_flutter/lib/src/attachment/builder/attachment_widget_builder.dart index 77e3d9ad3..d5ce29412 100644 --- a/packages/stream_chat_flutter/lib/src/attachment/builder/attachment_widget_builder.dart +++ b/packages/stream_chat_flutter/lib/src/attachment/builder/attachment_widget_builder.dart @@ -1,4 +1,3 @@ -import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; import 'package:stream_chat_flutter/stream_chat_flutter.dart'; diff --git a/packages/stream_chat_flutter/lib/src/attachment/builder/voice_recording_attachment_builder/voice_recording_attachment_builder.dart b/packages/stream_chat_flutter/lib/src/attachment/builder/voice_recording_attachment_builder/voice_recording_attachment_builder.dart index 286a30235..f1bf68c5c 100644 --- a/packages/stream_chat_flutter/lib/src/attachment/builder/voice_recording_attachment_builder/voice_recording_attachment_builder.dart +++ b/packages/stream_chat_flutter/lib/src/attachment/builder/voice_recording_attachment_builder/voice_recording_attachment_builder.dart @@ -22,10 +22,7 @@ class VoiceRecordingAttachmentBuilder extends StreamAttachmentWidgetBuilder { List _resolveWaveform(Attachment attachment) { final waveform = attachment.extraData['waveform_data'] as List? ?? []; - return waveform - .map((e) => double.tryParse(e.toString())) - .whereNotNull() - .toList(); + return waveform.map((e) => double.tryParse(e.toString())).nonNulls.toList(); } @override diff --git a/packages/stream_chat_flutter/lib/src/autocomplete/stream_command_autocomplete_options.dart b/packages/stream_chat_flutter/lib/src/autocomplete/stream_command_autocomplete_options.dart index 531314492..994bc5397 100644 --- a/packages/stream_chat_flutter/lib/src/autocomplete/stream_command_autocomplete_options.dart +++ b/packages/stream_chat_flutter/lib/src/autocomplete/stream_command_autocomplete_options.dart @@ -50,6 +50,7 @@ class StreamCommandAutocompleteOptions extends StatelessWidget { title: Text( context.translations.instantCommandsLabel, style: TextStyle( + // ignore: deprecated_member_use color: colorTheme.textHighEmphasis.withOpacity(0.5), ), ), diff --git a/packages/stream_chat_flutter/lib/src/avatars/gradient_avatar.dart b/packages/stream_chat_flutter/lib/src/avatars/gradient_avatar.dart index 4c7f23d25..93483619f 100644 --- a/packages/stream_chat_flutter/lib/src/avatars/gradient_avatar.dart +++ b/packages/stream_chat_flutter/lib/src/avatars/gradient_avatar.dart @@ -135,6 +135,7 @@ class PolygonGradientPainter extends CustomPainter { fontFamily: fontFamily, fontSize: fontSize, fontWeight: FontWeight.w500, + // ignore: deprecated_member_use color: Colors.white.withOpacity(0.7), ), ), diff --git a/packages/stream_chat_flutter/lib/src/bottom_sheets/error_alert_sheet.dart b/packages/stream_chat_flutter/lib/src/bottom_sheets/error_alert_sheet.dart index 67eb84328..8245fc982 100644 --- a/packages/stream_chat_flutter/lib/src/bottom_sheets/error_alert_sheet.dart +++ b/packages/stream_chat_flutter/lib/src/bottom_sheets/error_alert_sheet.dart @@ -50,6 +50,7 @@ class ErrorAlertSheet extends StatelessWidget { height: 36, ), Container( + // ignore: deprecated_member_use color: _streamChatTheme.colorTheme.textHighEmphasis.withOpacity(0.08), height: 1, ), diff --git a/packages/stream_chat_flutter/lib/src/channel/channel_info.dart b/packages/stream_chat_flutter/lib/src/channel/channel_info.dart index abab5ad93..cbec3fda2 100644 --- a/packages/stream_chat_flutter/lib/src/channel/channel_info.dart +++ b/packages/stream_chat_flutter/lib/src/channel/channel_info.dart @@ -53,8 +53,6 @@ class StreamChannelInfo extends StatelessWidget { client: client, textStyle: textStyle, ); - default: - return const Offstage(); } }, ), diff --git a/packages/stream_chat_flutter/lib/src/channel/channel_list_header.dart b/packages/stream_chat_flutter/lib/src/channel/channel_list_header.dart index 0e7973cd3..ac812bd6c 100644 --- a/packages/stream_chat_flutter/lib/src/channel/channel_list_header.dart +++ b/packages/stream_chat_flutter/lib/src/channel/channel_list_header.dart @@ -206,8 +206,6 @@ class StreamChannelListHeader extends StatelessWidget return _ConnectingTitleState(); case ConnectionStatus.disconnected: return _DisconnectedTitleState(client: _client); - default: - return const Offstage(); } }, ), diff --git a/packages/stream_chat_flutter/lib/src/gallery/gallery_footer.dart b/packages/stream_chat_flutter/lib/src/gallery/gallery_footer.dart index f6d5d8b9d..b1d2abaaa 100644 --- a/packages/stream_chat_flutter/lib/src/gallery/gallery_footer.dart +++ b/packages/stream_chat_flutter/lib/src/gallery/gallery_footer.dart @@ -261,12 +261,14 @@ class _StreamGalleryFooterState extends State { clipBehavior: Clip.antiAlias, decoration: BoxDecoration( shape: BoxShape.circle, + // ignore: deprecated_member_use color: Colors.white.withOpacity(0.6), boxShadow: [ BoxShadow( blurRadius: 8, color: chatThemeData .colorTheme.textHighEmphasis + // ignore: deprecated_member_use .withOpacity(0.3), ), ], diff --git a/packages/stream_chat_flutter/lib/src/indicators/upload_progress_indicator.dart b/packages/stream_chat_flutter/lib/src/indicators/upload_progress_indicator.dart index 4c14aa5cb..7a6b28981 100644 --- a/packages/stream_chat_flutter/lib/src/indicators/upload_progress_indicator.dart +++ b/packages/stream_chat_flutter/lib/src/indicators/upload_progress_indicator.dart @@ -71,6 +71,7 @@ class StreamUploadProgressIndicator extends StatelessWidget { child = DecoratedBox( decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), + // ignore: deprecated_member_use color: theme.colorTheme.overlayDark.withOpacity(0.6), ), child: child, diff --git a/packages/stream_chat_flutter/lib/src/message_input/clear_input_item_button.dart b/packages/stream_chat_flutter/lib/src/message_input/clear_input_item_button.dart index e7a93aeda..f8dc27ffa 100644 --- a/packages/stream_chat_flutter/lib/src/message_input/clear_input_item_button.dart +++ b/packages/stream_chat_flutter/lib/src/message_input/clear_input_item_button.dart @@ -31,6 +31,7 @@ class ClearInputItemButton extends StatelessWidget { hoverElevation: 0, onPressed: onTap, fillColor: + // ignore: deprecated_member_use _streamChatTheme.colorTheme.textHighEmphasis.withOpacity(0.5), child: Center( child: StreamSvgIcon.close( diff --git a/packages/stream_chat_flutter/lib/src/message_input/dm_checkbox.dart b/packages/stream_chat_flutter/lib/src/message_input/dm_checkbox.dart index 12fd58ea4..13a77bb4d 100644 --- a/packages/stream_chat_flutter/lib/src/message_input/dm_checkbox.dart +++ b/packages/stream_chat_flutter/lib/src/message_input/dm_checkbox.dart @@ -64,6 +64,7 @@ class DmCheckbox extends StatelessWidget { context.translations.alsoSendAsDirectMessageLabel, style: _streamChatTheme.textTheme.footnote.copyWith( color: + // ignore: deprecated_member_use _streamChatTheme.colorTheme.textHighEmphasis.withOpacity(0.5), ), ), diff --git a/packages/stream_chat_flutter/lib/src/message_input/stream_message_input.dart b/packages/stream_chat_flutter/lib/src/message_input/stream_message_input.dart index 17ee02da5..f259d203f 100644 --- a/packages/stream_chat_flutter/lib/src/message_input/stream_message_input.dart +++ b/packages/stream_chat_flutter/lib/src/message_input/stream_message_input.dart @@ -655,6 +655,7 @@ class StreamMessageInputState extends State : Border.all( color: _streamChatTheme .colorTheme.textHighEmphasis + // ignore: deprecated_member_use .withOpacity(0.5), width: 2, ), diff --git a/packages/stream_chat_flutter/lib/src/message_input/stream_message_input_attachment_list.dart b/packages/stream_chat_flutter/lib/src/message_input/stream_message_input_attachment_list.dart index 954691ee3..d8fd9eb46 100644 --- a/packages/stream_chat_flutter/lib/src/message_input/stream_message_input_attachment_list.dart +++ b/packages/stream_chat_flutter/lib/src/message_input/stream_message_input_attachment_list.dart @@ -357,6 +357,7 @@ class RemoveAttachmentButton extends StatelessWidget { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(16), ), + // ignore: deprecated_member_use fillColor: colorTheme.textHighEmphasis.withOpacity(0.5), child: StreamSvgIcon.close( size: 24, diff --git a/packages/stream_chat_flutter/lib/src/message_list_view/loading_indicator.dart b/packages/stream_chat_flutter/lib/src/message_list_view/loading_indicator.dart index 23229c337..c730efb00 100644 --- a/packages/stream_chat_flutter/lib/src/message_list_view/loading_indicator.dart +++ b/packages/stream_chat_flutter/lib/src/message_list_view/loading_indicator.dart @@ -41,6 +41,7 @@ class LoadingIndicator extends StatelessWidget { stream: stream, initialData: false, errorBuilder: (context, error) => ColoredBox( + // ignore: deprecated_member_use color: streamTheme.colorTheme.accentError.withOpacity(0.2), child: Center( child: Text(context.translations.loadingMessagesError), diff --git a/packages/stream_chat_flutter/lib/src/message_list_view/message_list_view.dart b/packages/stream_chat_flutter/lib/src/message_list_view/message_list_view.dart index 452d8e965..d8e808230 100644 --- a/packages/stream_chat_flutter/lib/src/message_list_view/message_list_view.dart +++ b/packages/stream_chat_flutter/lib/src/message_list_view/message_list_view.dart @@ -494,6 +494,7 @@ class _StreamMessageListViewState extends State { context.translations.emptyChatMessagesText, style: _streamTheme.textTheme.footnote.copyWith( color: _streamTheme.colorTheme.textHighEmphasis + // ignore: deprecated_member_use .withOpacity(0.5), ), ), @@ -508,6 +509,7 @@ class _StreamMessageListViewState extends State { context.translations.genericErrorText, style: _streamTheme.textTheme.footnote.copyWith( color: _streamTheme.colorTheme.textHighEmphasis + // ignore: deprecated_member_use .withOpacity(0.5), ), ), @@ -1447,6 +1449,7 @@ class _StreamMessageListViewState extends State { child = TweenAnimationBuilder( tween: ColorTween( begin: highlightColor, + // ignore: deprecated_member_use end: colorTheme.barsBg.withOpacity(0), ), duration: const Duration(seconds: 3), diff --git a/packages/stream_chat_flutter/lib/src/message_widget/giphy_ephemeral_message.dart b/packages/stream_chat_flutter/lib/src/message_widget/giphy_ephemeral_message.dart index 16bdcace9..c935a74b3 100644 --- a/packages/stream_chat_flutter/lib/src/message_widget/giphy_ephemeral_message.dart +++ b/packages/stream_chat_flutter/lib/src/message_widget/giphy_ephemeral_message.dart @@ -222,6 +222,7 @@ class GiphyHeader extends StatelessWidget { maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle( + // ignore: deprecated_member_use color: colorTheme.textHighEmphasis.withOpacity(0.5), ), ), diff --git a/packages/stream_chat_flutter/lib/src/message_widget/message_widget.dart b/packages/stream_chat_flutter/lib/src/message_widget/message_widget.dart index 153451c8d..2cbd22a4d 100644 --- a/packages/stream_chat_flutter/lib/src/message_widget/message_widget.dart +++ b/packages/stream_chat_flutter/lib/src/message_widget/message_widget.dart @@ -682,6 +682,7 @@ class _StreamMessageWidgetState extends State duration: const Duration(seconds: 1), color: widget.message.pinned && widget.showPinHighlight ? _streamChatTheme.colorTheme.highlight + // ignore: deprecated_member_use : _streamChatTheme.colorTheme.barsBg.withOpacity(0), child: Portal( child: PlatformWidgetBuilder( diff --git a/packages/stream_chat_flutter/lib/src/misc/info_tile.dart b/packages/stream_chat_flutter/lib/src/misc/info_tile.dart index 75bc6d4fc..fd6106491 100644 --- a/packages/stream_chat_flutter/lib/src/misc/info_tile.dart +++ b/packages/stream_chat_flutter/lib/src/misc/info_tile.dart @@ -51,6 +51,7 @@ class StreamInfoTile extends StatelessWidget { portalFollower: Container( height: 25, color: backgroundColor ?? + // ignore: deprecated_member_use chatThemeData.colorTheme.textLowEmphasis.withOpacity(0.9), child: Center( child: Text( diff --git a/packages/stream_chat_flutter/lib/src/poll/poll_option_reorderable_list_view.dart b/packages/stream_chat_flutter/lib/src/poll/poll_option_reorderable_list_view.dart index cc0d94126..a3be3d23f 100644 --- a/packages/stream_chat_flutter/lib/src/poll/poll_option_reorderable_list_view.dart +++ b/packages/stream_chat_flutter/lib/src/poll/poll_option_reorderable_list_view.dart @@ -195,7 +195,9 @@ class _PollOptionReorderableListViewState if (it.id == option.id) return false; return it.text == option.text; - })) return translations.pollOptionDuplicateError; + })) { + return translations.pollOptionDuplicateError; + } } return null; diff --git a/packages/stream_chat_flutter/lib/src/scroll_view/channel_scroll_view/stream_channel_list_tile.dart b/packages/stream_chat_flutter/lib/src/scroll_view/channel_scroll_view/stream_channel_list_tile.dart index 36b676f4c..5c07096c7 100644 --- a/packages/stream_chat_flutter/lib/src/scroll_view/channel_scroll_view/stream_channel_list_tile.dart +++ b/packages/stream_chat_flutter/lib/src/scroll_view/channel_scroll_view/stream_channel_list_tile.dart @@ -331,9 +331,13 @@ class ChannelListTileSubtitle extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.end, children: [ StreamSvgIcon.mute(size: 16), - Text( - ' ${context.translations.channelIsMutedText}', - style: textStyle, + Expanded( + child: Text( + ' ${context.translations.channelIsMutedText}', + style: textStyle, + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), ), ], ); diff --git a/packages/stream_chat_flutter/lib/src/scroll_view/channel_scroll_view/stream_channel_list_view.dart b/packages/stream_chat_flutter/lib/src/scroll_view/channel_scroll_view/stream_channel_list_view.dart index bf39b98d3..28d306f9f 100644 --- a/packages/stream_chat_flutter/lib/src/scroll_view/channel_scroll_view/stream_channel_list_view.dart +++ b/packages/stream_chat_flutter/lib/src/scroll_view/channel_scroll_view/stream_channel_list_view.dart @@ -376,6 +376,7 @@ class StreamChannelListSeparator extends StatelessWidget { final effect = StreamChatTheme.of(context).colorTheme.borderBottom; return Container( height: 1, + // ignore: deprecated_member_use color: effect.color!.withOpacity(effect.alpha ?? 1.0), ); } diff --git a/packages/stream_chat_flutter/lib/src/scroll_view/message_search_scroll_view/stream_message_search_list_view.dart b/packages/stream_chat_flutter/lib/src/scroll_view/message_search_scroll_view/stream_message_search_list_view.dart index 8b7d91df1..5f9dab18a 100644 --- a/packages/stream_chat_flutter/lib/src/scroll_view/message_search_scroll_view/stream_message_search_list_view.dart +++ b/packages/stream_chat_flutter/lib/src/scroll_view/message_search_scroll_view/stream_message_search_list_view.dart @@ -378,6 +378,7 @@ class StreamMessageSearchListSeparator extends StatelessWidget { final effect = StreamChatTheme.of(context).colorTheme.borderBottom; return Container( height: 1, + // ignore: deprecated_member_use color: effect.color!.withOpacity(effect.alpha ?? 1.0), ); } diff --git a/packages/stream_chat_flutter/lib/src/scroll_view/photo_gallery/stream_photo_gallery_tile.dart b/packages/stream_chat_flutter/lib/src/scroll_view/photo_gallery/stream_photo_gallery_tile.dart index 634ba9415..879fa9823 100644 --- a/packages/stream_chat_flutter/lib/src/scroll_view/photo_gallery/stream_photo_gallery_tile.dart +++ b/packages/stream_chat_flutter/lib/src/scroll_view/photo_gallery/stream_photo_gallery_tile.dart @@ -103,6 +103,7 @@ class StreamPhotoGalleryTile extends StatelessWidget { opacity: selected ? 1.0 : 0.0, child: Container( color: + // ignore: deprecated_member_use chatThemeData.colorTheme.textHighEmphasis.withOpacity(0.5), alignment: Alignment.topRight, padding: const EdgeInsets.only( diff --git a/packages/stream_chat_flutter/lib/src/scroll_view/stream_scroll_view_load_more_error.dart b/packages/stream_chat_flutter/lib/src/scroll_view/stream_scroll_view_load_more_error.dart index b2b4d15dc..d5ad8303b 100644 --- a/packages/stream_chat_flutter/lib/src/scroll_view/stream_scroll_view_load_more_error.dart +++ b/packages/stream_chat_flutter/lib/src/scroll_view/stream_scroll_view_load_more_error.dart @@ -77,6 +77,7 @@ class StreamScrollViewLoadMoreError extends StatelessWidget { ); final backgroundColor = this.backgroundColor ?? + // ignore: deprecated_member_use theme.colorTheme.textLowEmphasis.withOpacity(0.9); final children = [errorText, errorIcon]; diff --git a/packages/stream_chat_flutter/lib/src/scroll_view/user_scroll_view/stream_user_list_tile.dart b/packages/stream_chat_flutter/lib/src/scroll_view/user_scroll_view/stream_user_list_tile.dart index 1b0251f6a..554a134d6 100644 --- a/packages/stream_chat_flutter/lib/src/scroll_view/user_scroll_view/stream_user_list_tile.dart +++ b/packages/stream_chat_flutter/lib/src/scroll_view/user_scroll_view/stream_user_list_tile.dart @@ -183,6 +183,7 @@ class UserLastActive extends StatelessWidget { : '${context.translations.userLastOnlineText} ' '${Jiffy.parseFromDateTime(lastActive).fromNow()}', style: chatTheme.textTheme.footnote.copyWith( + // ignore: deprecated_member_use color: chatTheme.colorTheme.textHighEmphasis.withOpacity(0.5), ), ); diff --git a/packages/stream_chat_flutter/lib/src/scroll_view/user_scroll_view/stream_user_list_view.dart b/packages/stream_chat_flutter/lib/src/scroll_view/user_scroll_view/stream_user_list_view.dart index dcf8c7839..dc37f12c2 100644 --- a/packages/stream_chat_flutter/lib/src/scroll_view/user_scroll_view/stream_user_list_view.dart +++ b/packages/stream_chat_flutter/lib/src/scroll_view/user_scroll_view/stream_user_list_view.dart @@ -372,6 +372,7 @@ class StreamUserListSeparator extends StatelessWidget { final effect = StreamChatTheme.of(context).colorTheme.borderBottom; return Container( height: 1, + // ignore: deprecated_member_use color: effect.color!.withOpacity(effect.alpha ?? 1.0), ); } diff --git a/packages/stream_chat_flutter/lib/src/theme/stream_chat_theme.dart b/packages/stream_chat_flutter/lib/src/theme/stream_chat_theme.dart index 113125045..d9d2fad41 100644 --- a/packages/stream_chat_flutter/lib/src/theme/stream_chat_theme.dart +++ b/packages/stream_chat_flutter/lib/src/theme/stream_chat_theme.dart @@ -163,6 +163,7 @@ class StreamChatThemeData { color: const Color(0xff7A7A7A), ), lastMessageAtStyle: textTheme.footnote.copyWith( + // ignore: deprecated_member_use color: colorTheme.textHighEmphasis.withOpacity(0.5), ), indicatorIconSize: 16, diff --git a/packages/stream_chat_flutter/lib/src/utils/helpers.dart b/packages/stream_chat_flutter/lib/src/utils/helpers.dart index ea30afc12..69bbba6e4 100644 --- a/packages/stream_chat_flutter/lib/src/utils/helpers.dart +++ b/packages/stream_chat_flutter/lib/src/utils/helpers.dart @@ -99,6 +99,7 @@ Future showConfirmationBottomSheet( ), const SizedBox(height: 36), Container( + // ignore: deprecated_member_use color: effect.color!.withOpacity(effect.alpha ?? 1), height: 1, ), @@ -116,6 +117,7 @@ Future showConfirmationBottomSheet( cancelText, style: chatThemeData.textTheme.bodyBold.copyWith( color: chatThemeData.colorTheme.textHighEmphasis + // ignore: deprecated_member_use .withOpacity(0.5), ), ), @@ -189,7 +191,9 @@ Future showInfoBottomSheet( height: 36, ), Container( + // ignore: deprecated_member_use color: theme?.colorTheme.textHighEmphasis.withOpacity(0.08) ?? + // ignore: deprecated_member_use chatThemeData.colorTheme.textHighEmphasis.withOpacity(0.08), height: 1, ), @@ -201,6 +205,7 @@ Future showInfoBottomSheet( child: Text( okText, style: TextStyle( + // ignore: deprecated_member_use color: theme?.colorTheme.textHighEmphasis.withOpacity(0.5) ?? chatThemeData.colorTheme.accentPrimary, fontWeight: FontWeight.w400, diff --git a/packages/stream_chat_flutter/pubspec.yaml b/packages/stream_chat_flutter/pubspec.yaml index 0729152f2..7efcf8e7f 100644 --- a/packages/stream_chat_flutter/pubspec.yaml +++ b/packages/stream_chat_flutter/pubspec.yaml @@ -5,16 +5,28 @@ version: 8.3.0 repository: https://github.com/GetStream/stream-chat-flutter issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues +# Note: The environment configuration and dependency versions are managed by Melos. +# +# Do not edit them manually. +# +# Steps to update dependencies: +# 1. Modify the version in the melos.yaml file. +# 2. Run `melos bootstrap` to apply changes. +# +# Steps to add a new dependency: +# 1. Add the dependency to this list. +# 2. Add it to the melos.yaml file for future updates. + environment: - sdk: ">=3.4.0 <4.0.0" - flutter: ">=3.22.0" + sdk: ^3.5.4 + flutter: ">=3.24.5" dependencies: cached_network_image: ^3.3.1 chewie: ^1.8.1 collection: ^1.17.2 contextmenu: ^3.0.0 - desktop_drop: ^0.4.4 + desktop_drop: ^0.5.0 diacritic: ^0.1.5 dio: ^5.4.3+1 ezanimation: ^0.6.0 @@ -48,22 +60,15 @@ dependencies: url_launcher: ^6.3.0 video_player: ^2.8.7 -flutter: - plugin: - platforms: - android: - default_package: stream_chat_flutter - ios: - default_package: stream_chat_flutter - windows: - default_package: stream_chat_flutter - linux: - default_package: stream_chat_flutter - macos: - default_package: stream_chat_flutter - web: - default_package: stream_chat_flutter +dev_dependencies: + faker_dart: ^0.2.1 + flutter_test: + sdk: flutter + golden_toolkit: ^0.15.0 + mocktail: ^1.0.0 + path: ^1.8.3 +flutter: assets: - images/ - svgs/ @@ -71,10 +76,11 @@ flutter: - animations/ uses-material-design: true -dev_dependencies: - faker_dart: ^0.2.1 - flutter_test: - sdk: flutter - golden_toolkit: ^0.15.0 - mocktail: ^1.0.0 - path: ^1.8.3 +# This package supports all platforms listed below. +platforms: + android: + ios: + linux: + macos: + web: + windows: \ No newline at end of file diff --git a/packages/stream_chat_flutter/test/src/message_input/dm_checkbox_test.dart b/packages/stream_chat_flutter/test/src/message_input/dm_checkbox_test.dart index 32e4b87b7..6d559bf18 100644 --- a/packages/stream_chat_flutter/test/src/message_input/dm_checkbox_test.dart +++ b/packages/stream_chat_flutter/test/src/message_input/dm_checkbox_test.dart @@ -21,6 +21,7 @@ void main() { color: StreamChatThemeData.light() .colorTheme .textHighEmphasis + // ignore: deprecated_member_use .withOpacity(0.5), width: 2, ), @@ -58,6 +59,7 @@ void main() { color: StreamChatThemeData.light() .colorTheme .textHighEmphasis + // ignore: deprecated_member_use .withOpacity(0.5), width: 2, ), @@ -115,6 +117,7 @@ void main() { color: StreamChatThemeData.light() .colorTheme .textHighEmphasis + // ignore: deprecated_member_use .withOpacity(0.5), width: 2, ), diff --git a/packages/stream_chat_flutter/test/src/theme/avatar_theme_test.dart b/packages/stream_chat_flutter/test/src/theme/avatar_theme_test.dart index 8d055d529..44f6f8511 100644 --- a/packages/stream_chat_flutter/test/src/theme/avatar_theme_test.dart +++ b/packages/stream_chat_flutter/test/src/theme/avatar_theme_test.dart @@ -20,9 +20,16 @@ void main() { test('Lerp halfway', () { expect( - const StreamAvatarThemeData() - .lerp(_avatarThemeDataControl1, _avatarThemeDataControl2, 0.5), - _avatarThemeDataControlMidLerp); + const StreamAvatarThemeData().lerp( + _avatarThemeDataControl1, + _avatarThemeDataControl2, + 0.5, + ), + _avatarThemeDataControlMidLerp, + // TODO: Remove skip, once we drop support for flutter v3.24.0 + skip: true, + reason: 'Currently failing in flutter v3.27.0 due to new color alpha', + ); }); }); diff --git a/packages/stream_chat_flutter/test/src/theme/channel_header_theme_test.dart b/packages/stream_chat_flutter/test/src/theme/channel_header_theme_test.dart index a4a618c0a..3f5a54692 100644 --- a/packages/stream_chat_flutter/test/src/theme/channel_header_theme_test.dart +++ b/packages/stream_chat_flutter/test/src/theme/channel_header_theme_test.dart @@ -24,9 +24,16 @@ void main() { '''Light ChannelHeaderThemeData lerps halfway to dark ChannelHeaderThemeData''', () { expect( - const StreamChannelHeaderThemeData() - .lerp(_channelThemeControl, _channelThemeControlDark, 0.5), - _channelThemeControlMidLerp); + const StreamChannelHeaderThemeData().lerp( + _channelThemeControl, + _channelThemeControlDark, + 0.5, + ), + _channelThemeControlMidLerp, + // TODO: Remove skip, once we drop support for flutter v3.24.0 + skip: true, + reason: 'Currently failing in flutter v3.27.0 due to new color alpha', + ); }); test( diff --git a/packages/stream_chat_flutter/test/src/theme/channel_list_header_theme_test.dart b/packages/stream_chat_flutter/test/src/theme/channel_list_header_theme_test.dart index 65b7f958f..b9bd1f8c0 100644 --- a/packages/stream_chat_flutter/test/src/theme/channel_list_header_theme_test.dart +++ b/packages/stream_chat_flutter/test/src/theme/channel_list_header_theme_test.dart @@ -26,11 +26,16 @@ void main() { '''Light ChannelListHeaderThemeData lerps halfway to dark ChannelListHeaderThemeData''', () { expect( - const StreamChannelListHeaderThemeData().lerp( - _channelListHeaderThemeControl, - _channelListHeaderThemeControlDark, - 0.5), - _channelListHeaderThemeControlMidLerp); + const StreamChannelListHeaderThemeData().lerp( + _channelListHeaderThemeControl, + _channelListHeaderThemeControlDark, + 0.5, + ), + _channelListHeaderThemeControlMidLerp, + // TODO: Remove skip, once we drop support for flutter v3.24.0 + skip: true, + reason: 'Currently failing in flutter v3.27.0 due to new color alpha', + ); }); test( diff --git a/packages/stream_chat_flutter/test/src/theme/channel_preview_theme_test.dart b/packages/stream_chat_flutter/test/src/theme/channel_preview_theme_test.dart index e0e1d535d..b966781e2 100644 --- a/packages/stream_chat_flutter/test/src/theme/channel_preview_theme_test.dart +++ b/packages/stream_chat_flutter/test/src/theme/channel_preview_theme_test.dart @@ -24,11 +24,16 @@ void main() { '''Light ChannelPreviewThemeData lerps halfway to dark ChannelPreviewThemeData''', () { expect( - const StreamChannelPreviewThemeData().lerp( - _channelPreviewThemeControl, - _channelPreviewThemeControlDark, - 0.5), - _channelPreviewThemeControlMidLerp); + const StreamChannelPreviewThemeData().lerp( + _channelPreviewThemeControl, + _channelPreviewThemeControlDark, + 0.5, + ), + _channelPreviewThemeControlMidLerp, + // TODO: Remove skip, once we drop support for flutter v3.24.0 + skip: true, + reason: 'Currently failing in flutter v3.27.0 due to new color alpha', + ); }); test( @@ -61,6 +66,7 @@ final _channelPreviewThemeControl = StreamChannelPreviewThemeData( color: const Color(0xff7A7A7A), ), lastMessageAtStyle: StreamTextTheme.light().footnote.copyWith( + // ignore: deprecated_member_use color: StreamColorTheme.light().textHighEmphasis.withOpacity(0.5), ), indicatorIconSize: 16, @@ -86,6 +92,7 @@ final _channelPreviewThemeControlMidLerp = StreamChannelPreviewThemeData( fontWeight: FontWeight.w400, ), lastMessageAtStyle: StreamTextTheme.light().footnote.copyWith( + // ignore: deprecated_member_use color: const Color(0x807f7f7f).withOpacity(0.5), ), indicatorIconSize: 16, @@ -105,6 +112,7 @@ final _channelPreviewThemeControlDark = StreamChannelPreviewThemeData( color: const Color(0xff7A7A7A), ), lastMessageAtStyle: StreamTextTheme.dark().footnote.copyWith( + // ignore: deprecated_member_use color: StreamColorTheme.dark().textHighEmphasis.withOpacity(0.5), ), indicatorIconSize: 16, diff --git a/packages/stream_chat_flutter/test/src/theme/gallery_footer_theme_test.dart b/packages/stream_chat_flutter/test/src/theme/gallery_footer_theme_test.dart index 358d817a9..e06e0ac15 100644 --- a/packages/stream_chat_flutter/test/src/theme/gallery_footer_theme_test.dart +++ b/packages/stream_chat_flutter/test/src/theme/gallery_footer_theme_test.dart @@ -28,11 +28,16 @@ void main() { '''Light GalleryFooterThemeData lerps halfway to dark GalleryFooterThemeData''', () { expect( - const StreamGalleryFooterThemeData().lerp( - _galleryFooterThemeDataControl, - _galleryFooterThemeDataControlDark, - 0.5), - _galleryFooterThemeDataControlMidLerp); + const StreamGalleryFooterThemeData().lerp( + _galleryFooterThemeDataControl, + _galleryFooterThemeDataControlDark, + 0.5, + ), + _galleryFooterThemeDataControlMidLerp, + // TODO: Remove skip, once we drop support for flutter v3.24.0 + skip: true, + reason: 'Currently failing in flutter v3.27.0 due to new color alpha', + ); }); test( diff --git a/packages/stream_chat_flutter/test/src/theme/gallery_header_theme_test.dart b/packages/stream_chat_flutter/test/src/theme/gallery_header_theme_test.dart index 040a7696f..6c080193e 100644 --- a/packages/stream_chat_flutter/test/src/theme/gallery_header_theme_test.dart +++ b/packages/stream_chat_flutter/test/src/theme/gallery_header_theme_test.dart @@ -28,11 +28,16 @@ void main() { '''Light GalleryHeaderThemeData lerps halfway to dark GalleryHeaderThemeData''', () { expect( - const StreamGalleryHeaderThemeData().lerp( - _galleryHeaderThemeDataControl, - _galleryHeaderThemeDataDarkControl, - 0.5), - _galleryHeaderThemeDataHalfLerpControl); + const StreamGalleryHeaderThemeData().lerp( + _galleryHeaderThemeDataControl, + _galleryHeaderThemeDataDarkControl, + 0.5, + ), + _galleryHeaderThemeDataHalfLerpControl, + // TODO: Remove skip, once we drop support for flutter v3.24.0 + skip: true, + reason: 'Currently failing in flutter v3.27.0 due to new color alpha', + ); }); test( diff --git a/packages/stream_chat_flutter/test/src/theme/message_input_theme_test.dart b/packages/stream_chat_flutter/test/src/theme/message_input_theme_test.dart index 019fd8bc0..425fb5c15 100644 --- a/packages/stream_chat_flutter/test/src/theme/message_input_theme_test.dart +++ b/packages/stream_chat_flutter/test/src/theme/message_input_theme_test.dart @@ -20,9 +20,16 @@ void main() { test('Lerp halfway from light to dark', () { expect( - const StreamMessageInputThemeData().lerp( - _messageInputThemeControl, _messageInputThemeControlDark, 0.5), - _messageInputThemeControlMidLerp); + const StreamMessageInputThemeData().lerp( + _messageInputThemeControl, + _messageInputThemeControlDark, + 0.5, + ), + _messageInputThemeControlMidLerp, + // TODO: Remove skip, once we drop support for flutter v3.24.0 + skip: true, + reason: 'Currently failing in flutter v3.27.0 due to new color alpha', + ); }); test('Lerp completely from dark to light', () { diff --git a/packages/stream_chat_flutter/test/src/theme/message_list_view_theme_test.dart b/packages/stream_chat_flutter/test/src/theme/message_list_view_theme_test.dart index 79fb6dae9..ebcc8fbcc 100644 --- a/packages/stream_chat_flutter/test/src/theme/message_list_view_theme_test.dart +++ b/packages/stream_chat_flutter/test/src/theme/message_list_view_theme_test.dart @@ -30,11 +30,16 @@ void main() { '''Light MessageListViewThemeData lerps halfway to dark MessageListViewThemeData''', () { expect( - const StreamMessageListViewThemeData().lerp( - _messageListViewThemeDataControl, - _messageListViewThemeDataControlDark, - 0.5), - _messageListViewThemeDataControlHalfLerp); + const StreamMessageListViewThemeData().lerp( + _messageListViewThemeDataControl, + _messageListViewThemeDataControlDark, + 0.5, + ), + _messageListViewThemeDataControlHalfLerp, + // TODO: Remove skip, once we drop support for flutter v3.24.0 + skip: true, + reason: 'Currently failing in flutter v3.27.0 due to new color alpha', + ); }); test( diff --git a/packages/stream_chat_flutter_core/CHANGELOG.md b/packages/stream_chat_flutter_core/CHANGELOG.md index 4fd99944a..3ea33f528 100644 --- a/packages/stream_chat_flutter_core/CHANGELOG.md +++ b/packages/stream_chat_flutter_core/CHANGELOG.md @@ -4,6 +4,10 @@ - Added `StreamPollController` to create and manage a poll based on the passed configs. +🔄 Changed + +- Updated minimum Flutter version to 3.24.5 for the SDK. + ## 8.3.0 - Updated `stream_chat` dependency to [`8.3.0`](https://pub.dev/packages/stream_chat/changelog). diff --git a/packages/stream_chat_flutter_core/example/pubspec.yaml b/packages/stream_chat_flutter_core/example/pubspec.yaml index 4d510d0c2..683f71023 100644 --- a/packages/stream_chat_flutter_core/example/pubspec.yaml +++ b/packages/stream_chat_flutter_core/example/pubspec.yaml @@ -3,15 +3,27 @@ description: Example app for testing stream_chat_flutter_core publish_to: 'none' version: 1.0.0+1 +# Note: The environment configuration and dependency versions are managed by Melos. +# +# Do not edit them manually. +# +# Steps to update dependencies: +# 1. Modify the version in the melos.yaml file. +# 2. Run `melos bootstrap` to apply changes. +# +# Steps to add a new dependency: +# 1. Add the dependency to this list. +# 2. Add it to the melos.yaml file for future updates. + environment: - sdk: ">=3.3.0 <4.0.0" - flutter: ">=3.19.0" + sdk: ^3.5.4 + flutter: ">=3.24.5" dependencies: cupertino_icons: ^1.0.3 flutter: sdk: flutter - stream_chat_flutter_core: ^8.0.0 + stream_chat_flutter_core: ^8.3.0 flutter: uses-material-design: true diff --git a/packages/stream_chat_flutter_core/lib/src/stream_channel.dart b/packages/stream_chat_flutter_core/lib/src/stream_channel.dart index 095bbec93..7dae944f2 100644 --- a/packages/stream_chat_flutter_core/lib/src/stream_channel.dart +++ b/packages/stream_chat_flutter_core/lib/src/stream_channel.dart @@ -160,7 +160,9 @@ class StreamChannelState extends State { if (_bottomPaginationEnded || _queryBottomMessagesController.value || channel.state == null || - channel.state!.isUpToDate) return; + channel.state!.isUpToDate) { + return; + } _queryBottomMessagesController.safeAdd(true); if (channel.state!.messages.isEmpty) { @@ -205,7 +207,9 @@ class StreamChannelState extends State { }) async { if (_topPaginationEnded || _queryTopMessagesController.value || - channel.state == null) return; + channel.state == null) { + return; + } _queryTopMessagesController.safeAdd(true); Message? message; diff --git a/packages/stream_chat_flutter_core/pubspec.yaml b/packages/stream_chat_flutter_core/pubspec.yaml index 4b59396d1..395ff5c13 100644 --- a/packages/stream_chat_flutter_core/pubspec.yaml +++ b/packages/stream_chat_flutter_core/pubspec.yaml @@ -5,9 +5,21 @@ version: 8.3.0 repository: https://github.com/GetStream/stream-chat-flutter issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues +# Note: The environment configuration and dependency versions are managed by Melos. +# +# Do not edit them manually. +# +# Steps to update dependencies: +# 1. Modify the version in the melos.yaml file. +# 2. Run `melos bootstrap` to apply changes. +# +# Steps to add a new dependency: +# 1. Add the dependency to this list. +# 2. Add it to the melos.yaml file for future updates. + environment: - sdk: ">=3.4.0 <4.0.0" - flutter: ">=3.22.0" + sdk: ^3.5.4 + flutter: ">=3.24.5" dependencies: collection: ^1.17.2 @@ -24,6 +36,6 @@ dev_dependencies: fake_async: ^1.3.1 flutter_test: sdk: flutter - freezed: ^2.4.1 + freezed: ^2.4.2 mocktail: ^1.0.0 diff --git a/packages/stream_chat_flutter_core/test/stream_poll_controller_test.dart b/packages/stream_chat_flutter_core/test/stream_poll_controller_test.dart index dc4d6e6f0..ed5282eb6 100644 --- a/packages/stream_chat_flutter_core/test/stream_poll_controller_test.dart +++ b/packages/stream_chat_flutter_core/test/stream_poll_controller_test.dart @@ -1,4 +1,3 @@ -import 'package:collection/collection.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:stream_chat/stream_chat.dart'; import 'package:stream_chat_flutter_core/src/stream_poll_controller.dart'; @@ -104,7 +103,7 @@ void main() { final containsNameRangeError = errors .map((e) => e.mapOrNull(nameRange: (e) => e)) - .whereNotNull() + .nonNulls .isNotEmpty; expect(containsNameRangeError, isTrue); @@ -120,7 +119,7 @@ void main() { final containsDuplicateOptions = errors .map((e) => e.mapOrNull(duplicateOptions: (e) => e)) - .whereNotNull() + .nonNulls .isNotEmpty; expect(containsDuplicateOptions, isTrue); @@ -133,7 +132,7 @@ void main() { final containsOptionsRangeError = errors .map((e) => e.mapOrNull(optionsRange: (e) => e)) - .whereNotNull() + .nonNulls .isNotEmpty; expect(containsOptionsRangeError, isTrue); @@ -149,7 +148,7 @@ void main() { final containsMaxVotesAllowedError = errors .map((e) => e.mapOrNull(maxVotesAllowed: (e) => e)) - .whereNotNull() + .nonNulls .isNotEmpty; expect(containsMaxVotesAllowedError, isTrue); @@ -241,7 +240,7 @@ void main() { final errors = pollController.validateGranularly(); final containsNameRangeError = errors .map((e) => e.mapOrNull(nameRange: (e) => e)) - .whereNotNull() + .nonNulls .isNotEmpty; expect(containsNameRangeError, isFalse); @@ -259,7 +258,7 @@ void main() { final errors = pollController.validateGranularly(); final containsOptionsRangeError = errors .map((e) => e.mapOrNull(optionsRange: (e) => e)) - .whereNotNull() + .nonNulls .isNotEmpty; expect(containsOptionsRangeError, isFalse); @@ -273,7 +272,7 @@ void main() { final errors = pollController.validateGranularly(); final containsMaxVotesAllowedError = errors .map((e) => e.mapOrNull(maxVotesAllowed: (e) => e)) - .whereNotNull() + .nonNulls .isNotEmpty; expect(containsMaxVotesAllowedError, isFalse); diff --git a/packages/stream_chat_localizations/CHANGELOG.md b/packages/stream_chat_localizations/CHANGELOG.md index a3298eb3c..4b897196b 100644 --- a/packages/stream_chat_localizations/CHANGELOG.md +++ b/packages/stream_chat_localizations/CHANGELOG.md @@ -1,6 +1,7 @@ ## Upcoming - Added multiple new localization strings related to poll creation and validation. +- Updated minimum Flutter version to 3.24.5 for the SDK. ## 8.3.0 diff --git a/packages/stream_chat_localizations/example/pubspec.yaml b/packages/stream_chat_localizations/example/pubspec.yaml index 70a2a7d54..b925e4182 100644 --- a/packages/stream_chat_localizations/example/pubspec.yaml +++ b/packages/stream_chat_localizations/example/pubspec.yaml @@ -4,16 +4,28 @@ description: A new Flutter project. publish_to: 'none' version: 1.0.0+1 +# Note: The environment configuration and dependency versions are managed by Melos. +# +# Do not edit them manually. +# +# Steps to update dependencies: +# 1. Modify the version in the melos.yaml file. +# 2. Run `melos bootstrap` to apply changes. +# +# Steps to add a new dependency: +# 1. Add the dependency to this list. +# 2. Add it to the melos.yaml file for future updates. + environment: - sdk: ">=3.3.0 <4.0.0" - flutter: ">=3.19.0" + sdk: ^3.5.4 + flutter: ">=3.24.5" dependencies: cupertino_icons: ^1.0.3 flutter: sdk: flutter - stream_chat_flutter: ^8.0.0 - stream_chat_localizations: ^8.0.0 + stream_chat_flutter: ^8.3.0 + stream_chat_localizations: ^8.3.0 flutter: uses-material-design: true \ No newline at end of file diff --git a/packages/stream_chat_localizations/pubspec.yaml b/packages/stream_chat_localizations/pubspec.yaml index 08bca1f03..6402f67cf 100644 --- a/packages/stream_chat_localizations/pubspec.yaml +++ b/packages/stream_chat_localizations/pubspec.yaml @@ -5,33 +5,29 @@ homepage: https://github.com/GetStream/stream-chat-flutter repository: https://github.com/GetStream/stream-chat-flutter issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues +# Note: The environment configuration and dependency versions are managed by Melos. +# +# Do not edit them manually. +# +# Steps to update dependencies: +# 1. Modify the version in the melos.yaml file. +# 2. Run `melos bootstrap` to apply changes. +# +# Steps to add a new dependency: +# 1. Add the dependency to this list. +# 2. Add it to the melos.yaml file for future updates. + environment: - sdk: ">=3.4.0 <4.0.0" - flutter: ">=3.22.0" + sdk: ^3.5.4 + flutter: ">=3.24.5" dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter - stream_chat_flutter: ^8.2.0 + stream_chat_flutter: ^8.3.0 dev_dependencies: flutter_test: sdk: flutter - -flutter: - plugin: - platforms: - android: - default_package: stream_chat_localizations - ios: - default_package: stream_chat_localizations - windows: - default_package: stream_chat_localizations - linux: - default_package: stream_chat_localizations - macos: - default_package: stream_chat_localizations - web: - default_package: stream_chat_localizations diff --git a/packages/stream_chat_persistence/CHANGELOG.md b/packages/stream_chat_persistence/CHANGELOG.md index 38682972e..fa08a65fa 100644 --- a/packages/stream_chat_persistence/CHANGELOG.md +++ b/packages/stream_chat_persistence/CHANGELOG.md @@ -1,3 +1,7 @@ +## Upcoming + +- Updated minimum Flutter version to 3.24.5 for the SDK. + ## 8.3.0 - Updated `stream_chat` dependency to [`8.3.0`](https://pub.dev/packages/stream_chat/changelog). diff --git a/packages/stream_chat_persistence/example/pubspec.yaml b/packages/stream_chat_persistence/example/pubspec.yaml index bad8d662d..76623ae16 100644 --- a/packages/stream_chat_persistence/example/pubspec.yaml +++ b/packages/stream_chat_persistence/example/pubspec.yaml @@ -3,16 +3,28 @@ description: A new Flutter project. publish_to: 'none' version: 1.0.0+1 +# Note: The environment configuration and dependency versions are managed by Melos. +# +# Do not edit them manually. +# +# Steps to update dependencies: +# 1. Modify the version in the melos.yaml file. +# 2. Run `melos bootstrap` to apply changes. +# +# Steps to add a new dependency: +# 1. Add the dependency to this list. +# 2. Add it to the melos.yaml file for future updates. + environment: - sdk: ">=3.3.0 <4.0.0" - flutter: ">=3.19.0" + sdk: ^3.5.4 + flutter: ">=3.24.5" dependencies: cupertino_icons: ^1.0.3 flutter: sdk: flutter - stream_chat: ^8.0.0 - stream_chat_persistence: ^8.0.0 + stream_chat: ^8.3.0 + stream_chat_persistence: ^8.3.0 flutter: uses-material-design: true \ No newline at end of file diff --git a/packages/stream_chat_persistence/lib/src/db/drift_chat_database.g.dart b/packages/stream_chat_persistence/lib/src/db/drift_chat_database.g.dart index 48cb8f0e9..4226d2590 100644 --- a/packages/stream_chat_persistence/lib/src/db/drift_chat_database.g.dart +++ b/packages/stream_chat_persistence/lib/src/db/drift_chat_database.g.dart @@ -6789,8 +6789,7 @@ final class $$MessagesTableReferences db.channels.createAlias( $_aliasNameGenerator(db.messages.channelCid, db.channels.cid)); - $$ChannelsTableProcessedTableManager? get channelCid { - if ($_item.channelCid == null) return null; + $$ChannelsTableProcessedTableManager get channelCid { final manager = $$ChannelsTableTableManager($_db, $_db.channels) .filter((f) => f.cid($_item.channelCid!)); final item = $_typedResult.readTableOrNull(_channelCidTable($_db)); @@ -8156,8 +8155,7 @@ final class $$PinnedMessageReactionsTableReferences extends BaseReferences< db.pinnedMessages.createAlias($_aliasNameGenerator( db.pinnedMessageReactions.messageId, db.pinnedMessages.id)); - $$PinnedMessagesTableProcessedTableManager? get messageId { - if ($_item.messageId == null) return null; + $$PinnedMessagesTableProcessedTableManager get messageId { final manager = $$PinnedMessagesTableTableManager($_db, $_db.pinnedMessages) .filter((f) => f.id($_item.messageId!)); final item = $_typedResult.readTableOrNull(_messageIdTable($_db)); @@ -8453,8 +8451,7 @@ final class $$ReactionsTableReferences extends BaseReferences< db.messages.createAlias( $_aliasNameGenerator(db.reactions.messageId, db.messages.id)); - $$MessagesTableProcessedTableManager? get messageId { - if ($_item.messageId == null) return null; + $$MessagesTableProcessedTableManager get messageId { final manager = $$MessagesTableTableManager($_db, $_db.messages) .filter((f) => f.id($_item.messageId!)); final item = $_typedResult.readTableOrNull(_messageIdTable($_db)); @@ -8983,8 +8980,7 @@ final class $$MembersTableReferences db.channels.createAlias( $_aliasNameGenerator(db.members.channelCid, db.channels.cid)); - $$ChannelsTableProcessedTableManager? get channelCid { - if ($_item.channelCid == null) return null; + $$ChannelsTableProcessedTableManager get channelCid { final manager = $$ChannelsTableTableManager($_db, $_db.channels) .filter((f) => f.cid($_item.channelCid!)); final item = $_typedResult.readTableOrNull(_channelCidTable($_db)); @@ -9335,8 +9331,7 @@ final class $$ReadsTableReferences static $ChannelsTable _channelCidTable(_$DriftChatDatabase db) => db.channels .createAlias($_aliasNameGenerator(db.reads.channelCid, db.channels.cid)); - $$ChannelsTableProcessedTableManager? get channelCid { - if ($_item.channelCid == null) return null; + $$ChannelsTableProcessedTableManager get channelCid { final manager = $$ChannelsTableTableManager($_db, $_db.channels) .filter((f) => f.cid($_item.channelCid!)); final item = $_typedResult.readTableOrNull(_channelCidTable($_db)); diff --git a/packages/stream_chat_persistence/pubspec.yaml b/packages/stream_chat_persistence/pubspec.yaml index 181267349..a84b9da6a 100644 --- a/packages/stream_chat_persistence/pubspec.yaml +++ b/packages/stream_chat_persistence/pubspec.yaml @@ -5,12 +5,24 @@ version: 8.3.0 repository: https://github.com/GetStream/stream-chat-flutter issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues +# Note: The environment configuration and dependency versions are managed by Melos. +# +# Do not edit them manually. +# +# Steps to update dependencies: +# 1. Modify the version in the melos.yaml file. +# 2. Run `melos bootstrap` to apply changes. +# +# Steps to add a new dependency: +# 1. Add the dependency to this list. +# 2. Add it to the melos.yaml file for future updates. + environment: - sdk: ">=3.4.0 <4.0.0" - flutter: ">=3.22.0" + sdk: ^3.5.4 + flutter: ">=3.24.5" dependencies: - drift: ^2.18.0 + drift: ^2.22.1 flutter: sdk: flutter logging: ^1.2.0 @@ -22,8 +34,7 @@ dependencies: dev_dependencies: build_runner: ^2.4.9 - drift_dev: ^2.11.0 + drift_dev: ^2.22.1 flutter_test: sdk: flutter - mocktail: ^1.0.0 - \ No newline at end of file + mocktail: ^1.0.0 \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 000000000..244a4edea --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,341 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + ansi_styles: + dependency: transitive + description: + name: ansi_styles + sha256: "9c656cc12b3c27b17dd982b2cc5c0cfdfbdabd7bc8f3ae5e8542d9867b47ce8a" + url: "https://pub.dev" + source: hosted + version: "0.3.2+1" + args: + dependency: transitive + description: + name: args + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 + url: "https://pub.dev" + source: hosted + version: "2.6.0" + async: + dependency: transitive + description: + name: async + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + url: "https://pub.dev" + source: hosted + version: "2.12.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + charcode: + dependency: transitive + description: + name: charcode + sha256: fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a + url: "https://pub.dev" + source: hosted + version: "1.4.0" + cli_launcher: + dependency: transitive + description: + name: cli_launcher + sha256: "5e7e0282b79e8642edd6510ee468ae2976d847a0a29b3916e85f5fa1bfe24005" + url: "https://pub.dev" + source: hosted + version: "0.3.1" + cli_util: + dependency: transitive + description: + name: cli_util + sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c + url: "https://pub.dev" + source: hosted + version: "0.4.2" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + conventional_commit: + dependency: transitive + description: + name: conventional_commit + sha256: dec15ad1118f029c618651a4359eb9135d8b88f761aa24e4016d061cd45948f2 + url: "https://pub.dev" + source: hosted + version: "0.6.0+1" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + graphs: + dependency: transitive + description: + name: graphs + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + http: + dependency: transitive + description: + name: http + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + url: "https://pub.dev" + source: hosted + version: "1.2.2" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "76d306a1c3afb33fe82e2bbacad62a61f409b5634c915fceb0d799de1a913360" + url: "https://pub.dev" + source: hosted + version: "4.1.1" + intl: + dependency: transitive + description: + name: intl + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf + url: "https://pub.dev" + source: hosted + version: "0.19.0" + io: + dependency: transitive + description: + name: io + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b + url: "https://pub.dev" + source: hosted + version: "1.0.5" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + melos: + dependency: "direct dev" + description: + name: melos + sha256: a62abfa8c7826cec927f8585572bb9adf591be152150494d879ca2c75118809d + url: "https://pub.dev" + source: hosted + version: "6.2.0" + meta: + dependency: transitive + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + mustache_template: + dependency: transitive + description: + name: mustache_template + sha256: a46e26f91445bfb0b60519be280555b06792460b27b19e2b19ad5b9740df5d1c + url: "https://pub.dev" + source: hosted + version: "2.0.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + process: + dependency: transitive + description: + name: process + sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d" + url: "https://pub.dev" + source: hosted + version: "5.0.3" + prompts: + dependency: transitive + description: + name: prompts + sha256: "3773b845e85a849f01e793c4fc18a45d52d7783b4cb6c0569fad19f9d0a774a1" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd" + url: "https://pub.dev" + source: hosted + version: "2.1.5" + pub_updater: + dependency: transitive + description: + name: pub_updater + sha256: "54e8dc865349059ebe7f163d6acce7c89eb958b8047e6d6e80ce93b13d7c9e60" + url: "https://pub.dev" + source: hosted + version: "0.4.0" + pubspec: + dependency: transitive + description: + name: pubspec + sha256: f534a50a2b4d48dc3bc0ec147c8bd7c304280fff23b153f3f11803c4d49d927e + url: "https://pub.dev" + source: hosted + version: "2.3.0" + quiver: + dependency: transitive + description: + name: quiver + sha256: ea0b925899e64ecdfbf9c7becb60d5b50e706ade44a85b2363be2a22d88117d2 + url: "https://pub.dev" + source: hosted + version: "3.2.2" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "4ac0537115a24d772c408a2520ecd0abb99bca2ea9c4e634ccbdbfae64fe17ec" + url: "https://pub.dev" + source: hosted + version: "2.1.3" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + url: "https://pub.dev" + source: hosted + version: "0.7.4" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + uri: + dependency: transitive + description: + name: uri + sha256: "889eea21e953187c6099802b7b4cf5219ba8f3518f604a1033064d45b1b8268a" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + web: + dependency: transitive + description: + name: web + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + url: "https://pub.dev" + source: hosted + version: "1.1.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" + source: hosted + version: "3.1.3" + yaml_edit: + dependency: transitive + description: + name: yaml_edit + sha256: fb38626579fb345ad00e674e2af3a5c9b0cc4b9bfb8fd7f7ff322c7c9e62aef5 + url: "https://pub.dev" + source: hosted + version: "2.2.2" +sdks: + dart: ">=3.5.4 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 743b6d260..f9927cc08 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: stream_chat_flutter_workspace environment: - sdk: '>=3.1.0 <4.0.0' + sdk: ^3.5.4 dev_dependencies: - melos: ^3.1.1 + melos: ^6.2.0