From b132c803296de20d6b50817c9f943bb078503ddd Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 14 Aug 2026 14:09:00 +0200 Subject: [PATCH] chore(repo): bump min Flutter to 3.44.0 and Dart SDK to 3.12.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per the SDK's "minimum supported = latest stable - 1" policy, Flutter 3.47.0 shipping on 2026-08-12 makes 3.44.0 (Dart 3.12.0) the new floor. Following #2721/#2108/#2068, a floor raise is not marked breaking: existing code keeps compiling, older SDKs simply stop resolving the new version, and the CHANGELOG bullet goes under Changed rather than Breaking. Moves the three version knobs that must stay in lockstep — melos.yaml (source of truth), .fvmrc, and legacy_version_analyze.yml's flutter_version — plus the 13 pubspecs melos propagates to. Raising the Dart constraint also raises each package's language version, which activated `prefer_initializing_formals` on previously-silent sites: Dart 3.12 legalised `this._privateField` as a named parameter, so the lint's suggested fix only became expressible now. Applied via `dart fix --apply --code=prefer_initializing_formals`, verified by hand: - No doc comment was rewritten or dropped by the refactor. - Every introduced `this._foo` replaced a parameter named exactly `foo`, so no public call site changes. Assignments whose names differ or carry a default (`_provider = tokenProvider`, `_locationProvider = locationProvider ?? LocationProvider()`) were correctly left alone. Co-Authored-By: Claude Opus 5 (1M context) --- .fvmrc | 2 +- .github/workflows/legacy_version_analyze.yml | 2 +- docs/docs_screenshots/pubspec.yaml | 4 ++-- melos.yaml | 4 ++-- packages/stream_chat/CHANGELOG.md | 1 + packages/stream_chat/example/pubspec.yaml | 4 ++-- .../src/client/channel_delivery_reporter.dart | 5 ++--- .../stream_chat/lib/src/client/client.dart | 4 ++-- .../lib/src/core/api/sort_order.dart | 10 ++++----- .../lib/src/core/error/stream_chat_error.dart | 6 ++--- .../src/core/http/connection_id_manager.dart | 4 ++-- .../lib/src/core/http/token_manager.dart | 8 +++---- .../lib/src/core/models/draft_message.dart | 8 +++---- .../lib/src/core/models/message.dart | 8 +++---- .../stream_chat/lib/src/ws/websocket.dart | 4 ++-- packages/stream_chat/pubspec.yaml | 2 +- packages/stream_chat/test/src/fakes.dart | 9 ++++---- packages/stream_chat_flutter/CHANGELOG.md | 4 ++++ .../stream_chat_flutter/example/pubspec.yaml | 4 ++-- .../audio_recorder_controller.dart | 5 ++--- .../audio_recorder_feedback.dart | 22 +++++++------------ .../lib/src/misc/back_button.dart | 4 ++-- packages/stream_chat_flutter/pubspec.yaml | 4 ++-- .../stream_chat_flutter_core/CHANGELOG.md | 4 ++++ .../example/pubspec.yaml | 4 ++-- .../stream_chat_flutter_core/pubspec.yaml | 4 ++-- .../stream_chat_localizations/CHANGELOG.md | 4 ++++ .../example/pubspec.yaml | 4 ++-- .../stream_chat_localizations/pubspec.yaml | 4 ++-- packages/stream_chat_persistence/CHANGELOG.md | 4 ++++ .../example/pubspec.yaml | 4 ++-- .../src/stream_chat_persistence_client.dart | 5 ++--- packages/stream_chat_persistence/pubspec.yaml | 4 ++-- pubspec.lock | 2 +- pubspec.yaml | 2 +- sample_app/lib/push/push_provider.dart | 10 ++++----- .../lib/utils/shared_location_service.dart | 5 ++--- sample_app/pubspec.yaml | 4 ++-- 38 files changed, 93 insertions(+), 99 deletions(-) diff --git a/.fvmrc b/.fvmrc index 62fcd3217c..8ab3a25177 100644 --- a/.fvmrc +++ b/.fvmrc @@ -1,3 +1,3 @@ { - "flutter": "3.41.0" + "flutter": "3.44.0" } diff --git a/.github/workflows/legacy_version_analyze.yml b/.github/workflows/legacy_version_analyze.yml index 9eb316975a..c5cc4c4aef 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.41.0" + flutter_version: "3.44.0" on: push: diff --git a/docs/docs_screenshots/pubspec.yaml b/docs/docs_screenshots/pubspec.yaml index 31d311fea8..1b5c011734 100644 --- a/docs/docs_screenshots/pubspec.yaml +++ b/docs/docs_screenshots/pubspec.yaml @@ -11,8 +11,8 @@ publish_to: none # 2. Run `melos bootstrap` to apply changes. environment: - sdk: ^3.11.0 - flutter: ">=3.41.0" + sdk: ^3.12.0 + flutter: ">=3.44.0" dependencies: flutter: diff --git a/melos.yaml b/melos.yaml index e0468f5366..9763e9c3f0 100644 --- a/melos.yaml +++ b/melos.yaml @@ -24,9 +24,9 @@ command: # Dart and Flutter environment used in the project. environment: - sdk: ^3.11.0 + sdk: ^3.12.0 # We are not using carat '^' syntax here because flutter don't follow semantic versioning. - flutter: ">=3.41.0" + flutter: ">=3.44.0" # List of all the dependencies used in the project. dependencies: diff --git a/packages/stream_chat/CHANGELOG.md b/packages/stream_chat/CHANGELOG.md index 0c1801c939..3849aaa48f 100644 --- a/packages/stream_chat/CHANGELOG.md +++ b/packages/stream_chat/CHANGELOG.md @@ -14,6 +14,7 @@ 🔄 Changed - Raised the minimum `dio` version to `^5.11.0`. +- Raised minimum Dart SDK to `^3.12.0`. 🐞 Fixed diff --git a/packages/stream_chat/example/pubspec.yaml b/packages/stream_chat/example/pubspec.yaml index 0a6209d3fc..2be7da792e 100644 --- a/packages/stream_chat/example/pubspec.yaml +++ b/packages/stream_chat/example/pubspec.yaml @@ -17,8 +17,8 @@ version: 1.0.0+1 # 2. Add it to the melos.yaml file for future updates. environment: - sdk: ^3.11.0 - flutter: ">=3.41.0" + sdk: ^3.12.0 + flutter: ">=3.44.0" dependencies: cupertino_icons: ^1.0.3 diff --git a/packages/stream_chat/lib/src/client/channel_delivery_reporter.dart b/packages/stream_chat/lib/src/client/channel_delivery_reporter.dart index 1342d397a3..443ee132d3 100644 --- a/packages/stream_chat/lib/src/client/channel_delivery_reporter.dart +++ b/packages/stream_chat/lib/src/client/channel_delivery_reporter.dart @@ -29,11 +29,10 @@ class ChannelDeliveryReporter { /// /// The optional [logger] logs warnings and errors during operation. ChannelDeliveryReporter({ - Logger? logger, + this._logger, required this.onMarkChannelsDelivered, Duration throttleDuration = const Duration(seconds: 1), - }) : _logger = logger, - _markAsDeliveredThrottleDuration = throttleDuration; + }) : _markAsDeliveredThrottleDuration = throttleDuration; final Logger? _logger; final Duration _markAsDeliveredThrottleDuration; diff --git a/packages/stream_chat/lib/src/client/client.dart b/packages/stream_chat/lib/src/client/client.dart index 6bdc12a0c3..978c5e0e59 100644 --- a/packages/stream_chat/lib/src/client/client.dart +++ b/packages/stream_chat/lib/src/client/client.dart @@ -100,9 +100,9 @@ class StreamChatClient { AttachmentFileUploaderProvider attachmentFileUploaderProvider = StreamAttachmentFileUploader.new, Iterable? chatApiInterceptors, HttpClientAdapter? httpClientAdapter, - bool recoverStateOnReconnect = true, + this._recoverStateOnReconnect = true, this.isLocalUnreadCountEnabled = false, - }) : _recoverStateOnReconnect = recoverStateOnReconnect { + }) { logger.info('Initiating new StreamChatClient'); final options = StreamHttpClientOptions( diff --git a/packages/stream_chat/lib/src/core/api/sort_order.dart b/packages/stream_chat/lib/src/core/api/sort_order.dart index bfbdd520a4..fc60c378c2 100644 --- a/packages/stream_chat/lib/src/core/api/sort_order.dart +++ b/packages/stream_chat/lib/src/core/api/sort_order.dart @@ -53,7 +53,7 @@ class SortOption { const SortOption.desc( this.field, { NullOrdering? nullOrdering, - Comparator? comparator, + this._comparator, }) : direction = SortOption.DESC, // The server orders pinned_at and last_message_at NULLS LAST whichever // direction they are sorted in, so pinned and message-less channels @@ -63,8 +63,7 @@ class SortOption { nullOrdering ?? (field == ChannelSortKey.pinnedAt || field == ChannelSortKey.lastMessageAt ? NullOrdering.nullsLast - : NullOrdering.nullsFirst), - _comparator = comparator; + : NullOrdering.nullsFirst); /// Creates a SortOption for ascending order sorting by the specified field. /// @@ -76,12 +75,11 @@ class SortOption { const SortOption.asc( this.field, { NullOrdering? nullOrdering, - Comparator? comparator, + this._comparator, }) : direction = SortOption.ASC, // Every field the server sorts ascending orders nulls last, either // explicitly or by inheriting the default. - nullOrdering = nullOrdering ?? NullOrdering.nullsLast, - _comparator = comparator; + nullOrdering = nullOrdering ?? NullOrdering.nullsLast; /// Creates a [SortOption] from its JSON-serialized representation. /// diff --git a/packages/stream_chat/lib/src/core/error/stream_chat_error.dart b/packages/stream_chat/lib/src/core/error/stream_chat_error.dart index c28b3f6db5..9c468fe183 100644 --- a/packages/stream_chat/lib/src/core/error/stream_chat_error.dart +++ b/packages/stream_chat/lib/src/core/error/stream_chat_error.dart @@ -83,12 +83,11 @@ class StreamChatNetworkError extends StreamChatError { int? statusCode, this.data, StackTrace? stacktrace, - @Deprecated('Set type to StreamChatNetworkErrorType.cancel instead') bool? isRequestCancelledError, + @Deprecated('Set type to StreamChatNetworkErrorType.cancel instead') this._isRequestCancelledError, this.type = .unknown, }) : code = errorCode.code, statusCode = statusCode ?? data?.statusCode, stackTrace = stacktrace ?? StackTrace.current, - _isRequestCancelledError = isRequestCancelledError, super(errorCode.message); /// Creates a [StreamChatNetworkError] from raw values. @@ -98,10 +97,9 @@ class StreamChatNetworkError extends StreamChatError { this.statusCode, this.data, StackTrace? stacktrace, - @Deprecated('Set type to StreamChatNetworkErrorType.cancel instead') bool? isRequestCancelledError, + @Deprecated('Set type to StreamChatNetworkErrorType.cancel instead') this._isRequestCancelledError, this.type = .unknown, }) : stackTrace = stacktrace ?? StackTrace.current, - _isRequestCancelledError = isRequestCancelledError, super(message); /// Creates a [StreamChatNetworkError] from a [DioException]. diff --git a/packages/stream_chat/lib/src/core/http/connection_id_manager.dart b/packages/stream_chat/lib/src/core/http/connection_id_manager.dart index 59dcb1b651..f9b9fb1d51 100644 --- a/packages/stream_chat/lib/src/core/http/connection_id_manager.dart +++ b/packages/stream_chat/lib/src/core/http/connection_id_manager.dart @@ -4,8 +4,8 @@ class ConnectionIdManager { /// Initialize a new connection id manager ConnectionIdManager({ - String? connectionId, - }) : _connectionId = connectionId; + this._connectionId, + }); String? _connectionId; diff --git a/packages/stream_chat/lib/src/core/http/token_manager.dart b/packages/stream_chat/lib/src/core/http/token_manager.dart index 96b90bdcc0..ad3877d905 100644 --- a/packages/stream_chat/lib/src/core/http/token_manager.dart +++ b/packages/stream_chat/lib/src/core/http/token_manager.dart @@ -9,12 +9,10 @@ typedef TokenProvider = Future Function(String userId); class TokenManager { /// Initialize a new token manager TokenManager({ - String? userId, - Token? token, + this._userId, + this._token, TokenProvider? tokenProvider, - }) : _userId = userId, - _token = token, - _provider = tokenProvider; + }) : _provider = tokenProvider; String? _type; Token? _token; diff --git a/packages/stream_chat/lib/src/core/models/draft_message.dart b/packages/stream_chat/lib/src/core/models/draft_message.dart index b6ae3dede0..2ed4f68474 100644 --- a/packages/stream_chat/lib/src/core/models/draft_message.dart +++ b/packages/stream_chat/lib/src/core/models/draft_message.dart @@ -22,16 +22,14 @@ class DraftMessage extends Equatable { this.showInChannel, this.mentionedUsers = const [], this.quotedMessage, - String? quotedMessageId, + this._quotedMessageId, this.silent = false, this.command, this.poll, - String? pollId, + this._pollId, this.extraData = const {}, }) : id = id ?? const Uuid().v4(), - type = MessageType(type), - _quotedMessageId = quotedMessageId, - _pollId = pollId; + type = MessageType(type); /// Create a new instance from JSON. factory DraftMessage.fromJson(Map json) => _$DraftMessageFromJson( diff --git a/packages/stream_chat/lib/src/core/models/message.dart b/packages/stream_chat/lib/src/core/models/message.dart index 025e666216..53c9ace035 100644 --- a/packages/stream_chat/lib/src/core/models/message.dart +++ b/packages/stream_chat/lib/src/core/models/message.dart @@ -47,7 +47,7 @@ class Message extends Equatable implements ComparableFieldProvider { this.ownReactions, this.parentId, this.quotedMessage, - String? quotedMessageId, + this._quotedMessageId, this.replyCount = 0, this.threadParticipants, this.showInChannel, @@ -66,7 +66,7 @@ class Message extends Equatable implements ComparableFieldProvider { DateTime? pinExpires, this.pinnedBy, this.poll, - String? pollId, + this._pollId, this.extraData = const {}, this.state = const MessageState.initial(), this.i18n, @@ -81,9 +81,7 @@ class Message extends Equatable implements ComparableFieldProvider { pinExpires = pinExpires?.toUtc(), remoteCreatedAt = createdAt, remoteUpdatedAt = updatedAt, - remoteDeletedAt = deletedAt, - _quotedMessageId = quotedMessageId, - _pollId = pollId; + remoteDeletedAt = deletedAt; /// Create a new instance from JSON. factory Message.fromJson(Map json) { diff --git a/packages/stream_chat/lib/src/ws/websocket.dart b/packages/stream_chat/lib/src/ws/websocket.dart index 127bc3361e..9809caf8b3 100644 --- a/packages/stream_chat/lib/src/ws/websocket.dart +++ b/packages/stream_chat/lib/src/ws/websocket.dart @@ -40,14 +40,14 @@ class WebSocket with TimerHelper { required this.tokenManager, this.systemEnvironmentManager, this.handler, - Logger? logger, + this._logger, this.webSocketChannelProvider, this.reconnectionMonitorInterval = 10, this.healthCheckInterval = 20, this.reconnectionMonitorTimeout = 40, this.maxReconnectAttempts = 6, this.queryParameters = const {}, - }) : _logger = logger; + }); /// final String apiKey; diff --git a/packages/stream_chat/pubspec.yaml b/packages/stream_chat/pubspec.yaml index 1c6b789dd1..3fa08a1c2d 100644 --- a/packages/stream_chat/pubspec.yaml +++ b/packages/stream_chat/pubspec.yaml @@ -18,7 +18,7 @@ issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues # 2. Add it to the melos.yaml file for future updates. environment: - sdk: ^3.11.0 + sdk: ^3.12.0 dependencies: async: ^2.13.1 diff --git a/packages/stream_chat/test/src/fakes.dart b/packages/stream_chat/test/src/fakes.dart index e47a351957..6c2794b87c 100644 --- a/packages/stream_chat/test/src/fakes.dart +++ b/packages/stream_chat/test/src/fakes.dart @@ -47,10 +47,9 @@ class FakeMultiPartFile extends Fake implements MultipartFile {} /// Fake persistence client for testing persistence client reliability features class FakePersistenceClient extends Fake implements ChatPersistenceClient { FakePersistenceClient({ - DateTime? lastSyncAt, + this._lastSyncAt, List? channelCids, - }) : _lastSyncAt = lastSyncAt, - _channelCids = channelCids ?? []; + }) : _channelCids = channelCids ?? []; String? _userId; bool _isConnected = false; @@ -160,8 +159,8 @@ class FakeChatApi extends Fake implements StreamChatApi { class FakeClientState extends Fake implements ClientState { FakeClientState({ - OwnUser? currentUser, - }) : _currentUser = currentUser; + this._currentUser, + }); OwnUser? _currentUser; diff --git a/packages/stream_chat_flutter/CHANGELOG.md b/packages/stream_chat_flutter/CHANGELOG.md index 34592d485e..45dc571302 100644 --- a/packages/stream_chat_flutter/CHANGELOG.md +++ b/packages/stream_chat_flutter/CHANGELOG.md @@ -33,6 +33,10 @@ - Deprecated `height`/`width` of `StreamScrollViewLoadingWidget` in favor of `size`. - Deprecated `StreamBackButton.showUnreadCount` and `StreamBackButton.channelId` in favor of `unreadIndicator`. +🔄 Changed + +- Raised minimum Flutter to `>=3.44.0` and Dart SDK to `^3.12.0`. + 🐞 Fixed - Fixed a failed send surfacing as an unhandled async error when `StreamMessageComposer` has no `onError`; it is now reported through `FlutterError.reportError`. diff --git a/packages/stream_chat_flutter/example/pubspec.yaml b/packages/stream_chat_flutter/example/pubspec.yaml index a2069acfb1..ef723e0560 100644 --- a/packages/stream_chat_flutter/example/pubspec.yaml +++ b/packages/stream_chat_flutter/example/pubspec.yaml @@ -16,8 +16,8 @@ version: 1.0.0+1 # 2. Add it to the melos.yaml file for future updates. environment: - sdk: ^3.11.0 - flutter: ">=3.41.0" + sdk: ^3.12.0 + flutter: ">=3.44.0" dependencies: collection: ^1.19.1 diff --git a/packages/stream_chat_flutter/lib/src/message_input/audio_recorder/audio_recorder_controller.dart b/packages/stream_chat_flutter/lib/src/message_input/audio_recorder/audio_recorder_controller.dart index 8fc3d1c88d..54b165437c 100644 --- a/packages/stream_chat_flutter/lib/src/message_input/audio_recorder/audio_recorder_controller.dart +++ b/packages/stream_chat_flutter/lib/src/message_input/audio_recorder/audio_recorder_controller.dart @@ -42,11 +42,10 @@ class StreamAudioRecorderController extends ValueNotifier @visibleForTesting StreamAudioRecorderController.raw({ required this.config, - required AudioRecorder recorder, + required this._recorder, AudioRecorderState initialState = const RecordStateIdle(), Duration amplitudeInterval = const Duration(milliseconds: 100), - }) : _recorder = recorder, - super(initialState) { + }) : super(initialState) { // Listen to the recorder amplitude changes _recorderAmplitudeSubscription = _recorder .onAmplitudeChanged(amplitudeInterval) // diff --git a/packages/stream_chat_flutter/lib/src/message_input/audio_recorder/audio_recorder_feedback.dart b/packages/stream_chat_flutter/lib/src/message_input/audio_recorder/audio_recorder_feedback.dart index d33ce45657..eea05246da 100644 --- a/packages/stream_chat_flutter/lib/src/message_input/audio_recorder/audio_recorder_feedback.dart +++ b/packages/stream_chat_flutter/lib/src/message_input/audio_recorder/audio_recorder_feedback.dart @@ -168,20 +168,14 @@ class AudioRecorderFeedbackWrapper extends AudioRecorderFeedback { /// - [onStop]: Called when recording stops. const AudioRecorderFeedbackWrapper({ super.enableFeedback = true, - _FeedbackCallback? onStart, - _FeedbackCallback? onPause, - _FeedbackCallback? onFinish, - _FeedbackCallback? onLock, - _FeedbackCallback? onCancel, - _FeedbackCallback? onStartCancel, - _FeedbackCallback? onStop, - }) : _onStop = onStop, - _onStartCancel = onStartCancel, - _onCancel = onCancel, - _onLock = onLock, - _onFinish = onFinish, - _onPause = onPause, - _onStart = onStart; + this._onStart, + this._onPause, + this._onFinish, + this._onLock, + this._onCancel, + this._onStartCancel, + this._onStop, + }); // Callback for when recording starts. final _FeedbackCallback? _onStart; diff --git a/packages/stream_chat_flutter/lib/src/misc/back_button.dart b/packages/stream_chat_flutter/lib/src/misc/back_button.dart index 803d1163aa..ed0d8b754f 100644 --- a/packages/stream_chat_flutter/lib/src/misc/back_button.dart +++ b/packages/stream_chat_flutter/lib/src/misc/back_button.dart @@ -19,8 +19,8 @@ class StreamBackButton extends StatelessWidget { 'This will be removed in a future version.', ) this.channelId, - Widget? unreadIndicator = _unset, - }) : _unreadIndicator = unreadIndicator; + this._unreadIndicator = _unset, + }); /// Callback for when button is pressed final VoidCallback? onPressed; diff --git a/packages/stream_chat_flutter/pubspec.yaml b/packages/stream_chat_flutter/pubspec.yaml index a1e6a25945..f06d275482 100644 --- a/packages/stream_chat_flutter/pubspec.yaml +++ b/packages/stream_chat_flutter/pubspec.yaml @@ -18,8 +18,8 @@ issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues # 2. Add it to the melos.yaml file for future updates. environment: - sdk: ^3.11.0 - flutter: ">=3.41.0" + sdk: ^3.12.0 + flutter: ">=3.44.0" dependencies: cached_network_image: ^3.4.1 diff --git a/packages/stream_chat_flutter_core/CHANGELOG.md b/packages/stream_chat_flutter_core/CHANGELOG.md index 963333f11f..13121e07f8 100644 --- a/packages/stream_chat_flutter_core/CHANGELOG.md +++ b/packages/stream_chat_flutter_core/CHANGELOG.md @@ -6,6 +6,10 @@ - Added `DefaultStreamChannelBuilders`, an inherited widget that supplies default loading and error builders to descendant `StreamChannel`s (resolved via `loadingBuilderOf`/`errorBuilderOf`). - Added `search()`, `searchWithFilter()`, and `clearResults()` to `StreamMessageSearchListController`, `StreamUserListController`, and `StreamMemberListController`. `search()`/`searchWithFilter()` debounce reloads by the search-text length (a filter with no search text reloads immediately) and drop superseded results; `clearResults()` cancels any pending search and clears the results. +🔄 Changed + +- Raised minimum Flutter to `>=3.44.0` and Dart SDK to `^3.12.0`. + 🐞 Fixed - Fixed `StreamChannel`'s default error state exposing raw error details; it now shows a safe error state (icon, message, and a Try Again button wired to `retry()`) that adapts to the failure type. diff --git a/packages/stream_chat_flutter_core/example/pubspec.yaml b/packages/stream_chat_flutter_core/example/pubspec.yaml index 32f3f0a890..cc27a33969 100644 --- a/packages/stream_chat_flutter_core/example/pubspec.yaml +++ b/packages/stream_chat_flutter_core/example/pubspec.yaml @@ -16,8 +16,8 @@ version: 1.0.0+1 # 2. Add it to the melos.yaml file for future updates. environment: - sdk: ^3.11.0 - flutter: ">=3.41.0" + sdk: ^3.12.0 + flutter: ">=3.44.0" dependencies: cupertino_icons: ^1.0.3 diff --git a/packages/stream_chat_flutter_core/pubspec.yaml b/packages/stream_chat_flutter_core/pubspec.yaml index dad7101267..e4a58e9242 100644 --- a/packages/stream_chat_flutter_core/pubspec.yaml +++ b/packages/stream_chat_flutter_core/pubspec.yaml @@ -18,8 +18,8 @@ issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues # 2. Add it to the melos.yaml file for future updates. environment: - sdk: ^3.11.0 - flutter: ">=3.41.0" + sdk: ^3.12.0 + flutter: ">=3.44.0" dependencies: collection: ^1.19.1 diff --git a/packages/stream_chat_localizations/CHANGELOG.md b/packages/stream_chat_localizations/CHANGELOG.md index d583d86b58..df34c1d5b1 100644 --- a/packages/stream_chat_localizations/CHANGELOG.md +++ b/packages/stream_chat_localizations/CHANGELOG.md @@ -4,6 +4,10 @@ - Added connection-error translations (`connectionErrorTitle`/`Description`, `slowConnectionErrorTitle`/`Description`, `genericErrorTitle`/`Description`) for all supported locales. +🔄 Changed + +- Raised minimum Flutter to `>=3.44.0` and Dart SDK to `^3.12.0`. + ## 10.2.0 ✅ Added diff --git a/packages/stream_chat_localizations/example/pubspec.yaml b/packages/stream_chat_localizations/example/pubspec.yaml index 9600af8f74..1cde7b3570 100644 --- a/packages/stream_chat_localizations/example/pubspec.yaml +++ b/packages/stream_chat_localizations/example/pubspec.yaml @@ -17,8 +17,8 @@ version: 1.0.0+1 # 2. Add it to the melos.yaml file for future updates. environment: - sdk: ^3.11.0 - flutter: ">=3.41.0" + sdk: ^3.12.0 + flutter: ">=3.44.0" dependencies: cupertino_icons: ^1.0.3 diff --git a/packages/stream_chat_localizations/pubspec.yaml b/packages/stream_chat_localizations/pubspec.yaml index 488a374898..83358ed0c1 100644 --- a/packages/stream_chat_localizations/pubspec.yaml +++ b/packages/stream_chat_localizations/pubspec.yaml @@ -18,8 +18,8 @@ issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues # 2. Add it to the melos.yaml file for future updates. environment: - sdk: ^3.11.0 - flutter: ">=3.41.0" + sdk: ^3.12.0 + flutter: ">=3.44.0" dependencies: flutter: diff --git a/packages/stream_chat_persistence/CHANGELOG.md b/packages/stream_chat_persistence/CHANGELOG.md index d94031cec1..948a6d8851 100644 --- a/packages/stream_chat_persistence/CHANGELOG.md +++ b/packages/stream_chat_persistence/CHANGELOG.md @@ -1,5 +1,9 @@ ## Upcoming +🔄 Changed + +- Raised minimum Flutter to `>=3.44.0` and Dart SDK to `^3.12.0`. + 🐞 Fixed - Fixed truncated channels being the first to fall out of the 250-channel cap returned by `getChannelCids`. diff --git a/packages/stream_chat_persistence/example/pubspec.yaml b/packages/stream_chat_persistence/example/pubspec.yaml index 294fbf178d..23f804c14e 100644 --- a/packages/stream_chat_persistence/example/pubspec.yaml +++ b/packages/stream_chat_persistence/example/pubspec.yaml @@ -16,8 +16,8 @@ version: 1.0.0+1 # 2. Add it to the melos.yaml file for future updates. environment: - sdk: ^3.11.0 - flutter: ">=3.41.0" + sdk: ^3.12.0 + flutter: ">=3.44.0" dependencies: cupertino_icons: ^1.0.3 diff --git a/packages/stream_chat_persistence/lib/src/stream_chat_persistence_client.dart b/packages/stream_chat_persistence/lib/src/stream_chat_persistence_client.dart index 0a14996df3..4d391cc1b7 100644 --- a/packages/stream_chat_persistence/lib/src/stream_chat_persistence_client.dart +++ b/packages/stream_chat_persistence/lib/src/stream_chat_persistence_client.dart @@ -25,7 +25,7 @@ class StreamChatPersistenceClient extends ChatPersistenceClient { /// Creates a new instance of the stream chat persistence client StreamChatPersistenceClient({ /// Connection mode on which the client will work - ConnectionMode connectionMode = ConnectionMode.regular, + this._connectionMode = ConnectionMode.regular, Level logLevel = Level.WARNING, /// Whether to use an experimental storage implementation on the web @@ -33,8 +33,7 @@ class StreamChatPersistenceClient extends ChatPersistenceClient { /// Otherwise, falls back to the local storage based implementation. bool webUseExperimentalIndexedDb = false, LogHandlerFunction? logHandlerFunction, - }) : _connectionMode = connectionMode, - _webUseIndexedDbIfSupported = webUseExperimentalIndexedDb, + }) : _webUseIndexedDbIfSupported = webUseExperimentalIndexedDb, _logger = Logger.detached('💽')..level = logLevel { _logger.onRecord.listen(logHandlerFunction ?? _defaultLogHandler); } diff --git a/packages/stream_chat_persistence/pubspec.yaml b/packages/stream_chat_persistence/pubspec.yaml index 1830d2cd3f..4850b2d5ce 100644 --- a/packages/stream_chat_persistence/pubspec.yaml +++ b/packages/stream_chat_persistence/pubspec.yaml @@ -18,8 +18,8 @@ issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues # 2. Add it to the melos.yaml file for future updates. environment: - sdk: ^3.11.0 - flutter: ">=3.41.0" + sdk: ^3.12.0 + flutter: ">=3.44.0" dependencies: drift: ^2.33.0 diff --git a/pubspec.lock b/pubspec.lock index 31c50fa96f..6adac3b8ad 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -410,4 +410,4 @@ packages: source: hosted version: "2.2.4" sdks: - dart: ">=3.11.0 <4.0.0" + dart: ">=3.12.0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 273ec24c40..787a504b64 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: stream_chat_flutter_workspace environment: - sdk: ^3.11.0 + sdk: ^3.12.0 dev_dependencies: code_builder: ^4.10.1 diff --git a/sample_app/lib/push/push_provider.dart b/sample_app/lib/push/push_provider.dart index 51e9357e93..3ce184994e 100644 --- a/sample_app/lib/push/push_provider.dart +++ b/sample_app/lib/push/push_provider.dart @@ -14,9 +14,8 @@ class PushProvider { /// Firebase Cloud Messaging; works on both iOS and Android. const PushProvider.firebase({ required this.name, - TokenStreamProvider tokenStreamProvider = _firebaseTokenProvider, - }) : _tokenStreamProvider = tokenStreamProvider, - type = chat.PushProvider.firebase; + this._tokenStreamProvider = _firebaseTokenProvider, + }) : type = chat.PushProvider.firebase; /// Raw Apple Push Notification service. /// @@ -26,9 +25,8 @@ class PushProvider { /// non-Firebase tooling. const PushProvider.apn({ required this.name, - TokenStreamProvider tokenStreamProvider = _apnTokenProvider, - }) : _tokenStreamProvider = tokenStreamProvider, - type = chat.PushProvider.apn; + this._tokenStreamProvider = _apnTokenProvider, + }) : type = chat.PushProvider.apn; static Stream _firebaseTokenProvider() async* { // On iOS, `getToken()` throws if the APNs token isn't registered with diff --git a/sample_app/lib/utils/shared_location_service.dart b/sample_app/lib/utils/shared_location_service.dart index 27e04868dd..599ff81ff5 100644 --- a/sample_app/lib/utils/shared_location_service.dart +++ b/sample_app/lib/utils/shared_location_service.dart @@ -7,10 +7,9 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart'; class SharedLocationService { SharedLocationService({ - required StreamChatClient client, + required this._client, LocationProvider? locationProvider, - }) : _client = client, - _locationProvider = locationProvider ?? LocationProvider(); + }) : _locationProvider = locationProvider ?? LocationProvider(); final StreamChatClient _client; final LocationProvider _locationProvider; diff --git a/sample_app/pubspec.yaml b/sample_app/pubspec.yaml index fbf6a5ab4d..b6a2f13506 100644 --- a/sample_app/pubspec.yaml +++ b/sample_app/pubspec.yaml @@ -16,8 +16,8 @@ version: 10.2.0 # 2. Add it to the melos.yaml file for future updates. environment: - sdk: ^3.11.0 - flutter: ">=3.41.0" + sdk: ^3.12.0 + flutter: ">=3.44.0" dependencies: app_badge_plus: ^1.3.2