Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .fvmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"flutter": "3.41.0"
"flutter": "3.44.0"
}
2 changes: 1 addition & 1 deletion .github/workflows/legacy_version_analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions docs/docs_screenshots/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions packages/stream_chat/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
🔄 Changed

- Raised the minimum `dio` version to `^5.11.0`.
- Raised minimum Dart SDK to `^3.12.0`.

🐞 Fixed

Expand Down
4 changes: 2 additions & 2 deletions packages/stream_chat/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions packages/stream_chat/lib/src/client/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ class StreamChatClient {
AttachmentFileUploaderProvider attachmentFileUploaderProvider = StreamAttachmentFileUploader.new,
Iterable<Interceptor>? chatApiInterceptors,
HttpClientAdapter? httpClientAdapter,
bool recoverStateOnReconnect = true,
this._recoverStateOnReconnect = true,
this.isLocalUnreadCountEnabled = false,
}) : _recoverStateOnReconnect = recoverStateOnReconnect {
}) {
logger.info('Initiating new StreamChatClient');

final options = StreamHttpClientOptions(
Expand Down
10 changes: 4 additions & 6 deletions packages/stream_chat/lib/src/core/api/sort_order.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class SortOption<T extends ComparableFieldProvider> {
const SortOption.desc(
this.field, {
NullOrdering? nullOrdering,
Comparator<T>? 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
Expand All @@ -63,8 +63,7 @@ class SortOption<T extends ComparableFieldProvider> {
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.
///
Expand All @@ -76,12 +75,11 @@ class SortOption<T extends ComparableFieldProvider> {
const SortOption.asc(
this.field, {
NullOrdering? nullOrdering,
Comparator<T>? 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.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
class ConnectionIdManager {
/// Initialize a new connection id manager
ConnectionIdManager({
String? connectionId,
}) : _connectionId = connectionId;
this._connectionId,
});

String? _connectionId;

Expand Down
8 changes: 3 additions & 5 deletions packages/stream_chat/lib/src/core/http/token_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ typedef TokenProvider = Future<String> 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;
Expand Down
8 changes: 3 additions & 5 deletions packages/stream_chat/lib/src/core/models/draft_message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, dynamic> json) => _$DraftMessageFromJson(
Expand Down
8 changes: 3 additions & 5 deletions packages/stream_chat/lib/src/core/models/message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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<String, dynamic> json) {
Expand Down
4 changes: 2 additions & 2 deletions packages/stream_chat/lib/src/ws/websocket.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/stream_chat/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 4 additions & 5 deletions packages/stream_chat/test/src/fakes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>? channelCids,
}) : _lastSyncAt = lastSyncAt,
_channelCids = channelCids ?? [];
}) : _channelCids = channelCids ?? [];

String? _userId;
bool _isConnected = false;
Expand Down Expand Up @@ -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;

Expand Down
4 changes: 4 additions & 0 deletions packages/stream_chat_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
4 changes: 2 additions & 2 deletions packages/stream_chat_flutter/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ class StreamAudioRecorderController extends ValueNotifier<AudioRecorderState>
@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) //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions packages/stream_chat_flutter/lib/src/misc/back_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions packages/stream_chat_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions packages/stream_chat_flutter_core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions packages/stream_chat_flutter_core/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/stream_chat_flutter_core/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions packages/stream_chat_localizations/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading
Loading