Skip to content

Commit b132c80

Browse files
xsahil03xclaude
andcommitted
chore(repo): bump min Flutter to 3.44.0 and Dart SDK to 3.12.0
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) <noreply@anthropic.com>
1 parent 3c6ad32 commit b132c80

38 files changed

Lines changed: 93 additions & 99 deletions

.fvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"flutter": "3.41.0"
2+
"flutter": "3.44.0"
33
}

.github/workflows/legacy_version_analyze.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: legacy_version_analyze
33
env:
44
# Note: The versions below should be manually updated after a new stable
55
# version comes out.
6-
flutter_version: "3.41.0"
6+
flutter_version: "3.44.0"
77

88
on:
99
push:

docs/docs_screenshots/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ publish_to: none
1111
# 2. Run `melos bootstrap` to apply changes.
1212

1313
environment:
14-
sdk: ^3.11.0
15-
flutter: ">=3.41.0"
14+
sdk: ^3.12.0
15+
flutter: ">=3.44.0"
1616

1717
dependencies:
1818
flutter:

melos.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ command:
2424

2525
# Dart and Flutter environment used in the project.
2626
environment:
27-
sdk: ^3.11.0
27+
sdk: ^3.12.0
2828
# We are not using carat '^' syntax here because flutter don't follow semantic versioning.
29-
flutter: ">=3.41.0"
29+
flutter: ">=3.44.0"
3030

3131
# List of all the dependencies used in the project.
3232
dependencies:

packages/stream_chat/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
🔄 Changed
1515

1616
- Raised the minimum `dio` version to `^5.11.0`.
17+
- Raised minimum Dart SDK to `^3.12.0`.
1718

1819
🐞 Fixed
1920

packages/stream_chat/example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ version: 1.0.0+1
1717
# 2. Add it to the melos.yaml file for future updates.
1818

1919
environment:
20-
sdk: ^3.11.0
21-
flutter: ">=3.41.0"
20+
sdk: ^3.12.0
21+
flutter: ">=3.44.0"
2222

2323
dependencies:
2424
cupertino_icons: ^1.0.3

packages/stream_chat/lib/src/client/channel_delivery_reporter.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,10 @@ class ChannelDeliveryReporter {
2929
///
3030
/// The optional [logger] logs warnings and errors during operation.
3131
ChannelDeliveryReporter({
32-
Logger? logger,
32+
this._logger,
3333
required this.onMarkChannelsDelivered,
3434
Duration throttleDuration = const Duration(seconds: 1),
35-
}) : _logger = logger,
36-
_markAsDeliveredThrottleDuration = throttleDuration;
35+
}) : _markAsDeliveredThrottleDuration = throttleDuration;
3736

3837
final Logger? _logger;
3938
final Duration _markAsDeliveredThrottleDuration;

packages/stream_chat/lib/src/client/client.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ class StreamChatClient {
100100
AttachmentFileUploaderProvider attachmentFileUploaderProvider = StreamAttachmentFileUploader.new,
101101
Iterable<Interceptor>? chatApiInterceptors,
102102
HttpClientAdapter? httpClientAdapter,
103-
bool recoverStateOnReconnect = true,
103+
this._recoverStateOnReconnect = true,
104104
this.isLocalUnreadCountEnabled = false,
105-
}) : _recoverStateOnReconnect = recoverStateOnReconnect {
105+
}) {
106106
logger.info('Initiating new StreamChatClient');
107107

108108
final options = StreamHttpClientOptions(

packages/stream_chat/lib/src/core/api/sort_order.dart

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class SortOption<T extends ComparableFieldProvider> {
5353
const SortOption.desc(
5454
this.field, {
5555
NullOrdering? nullOrdering,
56-
Comparator<T>? comparator,
56+
this._comparator,
5757
}) : direction = SortOption.DESC,
5858
// The server orders pinned_at and last_message_at NULLS LAST whichever
5959
// direction they are sorted in, so pinned and message-less channels
@@ -63,8 +63,7 @@ class SortOption<T extends ComparableFieldProvider> {
6363
nullOrdering ??
6464
(field == ChannelSortKey.pinnedAt || field == ChannelSortKey.lastMessageAt
6565
? NullOrdering.nullsLast
66-
: NullOrdering.nullsFirst),
67-
_comparator = comparator;
66+
: NullOrdering.nullsFirst);
6867

6968
/// Creates a SortOption for ascending order sorting by the specified field.
7069
///
@@ -76,12 +75,11 @@ class SortOption<T extends ComparableFieldProvider> {
7675
const SortOption.asc(
7776
this.field, {
7877
NullOrdering? nullOrdering,
79-
Comparator<T>? comparator,
78+
this._comparator,
8079
}) : direction = SortOption.ASC,
8180
// Every field the server sorts ascending orders nulls last, either
8281
// explicitly or by inheriting the default.
83-
nullOrdering = nullOrdering ?? NullOrdering.nullsLast,
84-
_comparator = comparator;
82+
nullOrdering = nullOrdering ?? NullOrdering.nullsLast;
8583

8684
/// Creates a [SortOption] from its JSON-serialized representation.
8785
///

packages/stream_chat/lib/src/core/error/stream_chat_error.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,11 @@ class StreamChatNetworkError extends StreamChatError {
8383
int? statusCode,
8484
this.data,
8585
StackTrace? stacktrace,
86-
@Deprecated('Set type to StreamChatNetworkErrorType.cancel instead') bool? isRequestCancelledError,
86+
@Deprecated('Set type to StreamChatNetworkErrorType.cancel instead') this._isRequestCancelledError,
8787
this.type = .unknown,
8888
}) : code = errorCode.code,
8989
statusCode = statusCode ?? data?.statusCode,
9090
stackTrace = stacktrace ?? StackTrace.current,
91-
_isRequestCancelledError = isRequestCancelledError,
9291
super(errorCode.message);
9392

9493
/// Creates a [StreamChatNetworkError] from raw values.
@@ -98,10 +97,9 @@ class StreamChatNetworkError extends StreamChatError {
9897
this.statusCode,
9998
this.data,
10099
StackTrace? stacktrace,
101-
@Deprecated('Set type to StreamChatNetworkErrorType.cancel instead') bool? isRequestCancelledError,
100+
@Deprecated('Set type to StreamChatNetworkErrorType.cancel instead') this._isRequestCancelledError,
102101
this.type = .unknown,
103102
}) : stackTrace = stacktrace ?? StackTrace.current,
104-
_isRequestCancelledError = isRequestCancelledError,
105103
super(message);
106104

107105
/// Creates a [StreamChatNetworkError] from a [DioException].

0 commit comments

Comments
 (0)