Skip to content
Merged
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
482 changes: 482 additions & 0 deletions .claude/skills/flutter-version-bump/SKILL.md

Large diffs are not rendered by default.

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.38.10"
flutter_version: "3.44.0"

on:
push:
Expand Down
9 changes: 9 additions & 0 deletions STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1352,12 +1352,21 @@ sub-headings:

- Fixed a crash when opening the media viewer with an empty attachments list.

### 🔄 Changed

- Raised the minimum Flutter version to `>=3.44.0` and the Dart SDK to `^3.12.0`.

### 🛑 Breaking / Removals

- Removed `StreamCoreMessageComposer`. Use `StreamMessageComposer` from
`stream_chat_flutter` instead.
```

`### 🔄 Changed` covers what is neither new API nor a fix and does not break
existing code — a raised minimum Flutter/Dart version, a tightened dependency
constraint, a changed default. A raised floor is **not** breaking: code keeps
compiling, older SDKs simply stop resolving the new version.

Prefer **one short bullet** per entry, describing the functional change. Longer
entries are acceptable for user-visible multi-facet features where the extra
context matters to someone deciding whether to upgrade — but avoid sub-bullets,
Expand Down
16 changes: 15 additions & 1 deletion all_lint_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ linter:
- always_use_package_imports
- annotate_overrides
- annotate_redeclares
- async_return_with_no_await
- avoid_annotating_with_dynamic
- avoid_bool_literals_in_conditional_expressions
- avoid_catches_without_on_clauses
Expand Down Expand Up @@ -71,15 +72,18 @@ linter:
- document_ignores
- empty_catches
- empty_constructor_bodies
- empty_container_bodies
- empty_statements
- eol_at_end_of_file
- exhaustive_cases
- file_names
- flutter_style_todos
- future_sync_value
- hash_and_equals
- implementation_imports
- implicit_call_tearoffs
- implicit_reopen
- initialize_in_field_declaration
- invalid_case_patterns
- invalid_runtime_check_with_js_interop_types
- join_return_with_assignment
Expand All @@ -91,16 +95,19 @@ linter:
- lines_longer_than_80_chars
- literal_only_boolean_expressions
- matching_super_parameters
- migrate_design_widgets
- missing_code_block_language_in_doc_comment
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
- no_default_cases
- no_duplicate_case_values
- no_dynamic_casts
- no_leading_underscores_for_library_prefixes
- no_leading_underscores_for_local_identifiers
- no_literal_bool_comparisons
- no_logic_in_create_state
- no_runtimeType_toString
- no_raw_types
- no_runtimetype_tostring
- no_self_assignments
- no_wildcard_variable_uses
- non_constant_identifier_names
Expand Down Expand Up @@ -161,6 +168,7 @@ linter:
- remove_deprecations_in_breaking_versions
- require_trailing_commas
- secure_pubspec_urls
- simple_directive_paths
- simplify_variable_pattern
- sized_box_for_whitespace
- sized_box_shrink_expand
Expand All @@ -186,6 +194,7 @@ linter:
- unnecessary_brace_in_string_interps
- unnecessary_breaks
- unnecessary_const
- unnecessary_const_in_enum_constructor
- unnecessary_constructor_name
- unnecessary_final
- unnecessary_getters_setters
Expand All @@ -202,19 +211,23 @@ linter:
- unnecessary_nullable_for_final_variable_declarations
- unnecessary_overrides
- unnecessary_parenthesis
- unnecessary_primary_constructor_body
- unnecessary_raw_strings
- unnecessary_statements
- unnecessary_string_escapes
- unnecessary_string_interpolations
- unnecessary_this
- unnecessary_this_alias
- unnecessary_to_list_in_spreads
- unnecessary_type_name_in_constructor
- unnecessary_unawaited
- unnecessary_underscores
- unreachable_from_main
- unrelated_type_equality_checks
- unsafe_variance
- use_build_context_synchronously
- use_colored_box
- use_declaring_parameters
- use_decorated_box
- use_enums
- use_full_hex_values_for_flutter_colors
Expand All @@ -235,4 +248,5 @@ linter:
- use_to_and_as_if_applicable
- use_truncating_division
- valid_regexps
- var_with_no_type_annotation
- void_checks
8 changes: 8 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ linter:
# Single quotes are easier to type and don't compromise on readability.
prefer_double_quotes: false

# Conflicts with `unnecessary_await_in_return`, which stays enabled.
# The `await` only matters inside a `try`, and no site returns one there.
async_return_with_no_await: false

# Enabled once the packages move to `material_ui`; until then it fires on
# every `package:flutter/material.dart` import in the repo.
migrate_design_widgets: false

# Conflicts with `omit_local_variable_types` and other rules.
# As per Dart guidelines, we want to avoid unnecessary types to make the code
# more readable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import 'package:stream_core_flutter/core.dart';
/// exact naming conventions from [StreamColorScheme].
class ThemeConfiguration extends ChangeNotifier {
ThemeConfiguration({
Brightness brightness = Brightness.light,
}) : _brightness = brightness {
this._brightness = Brightness.light,
}) {
Comment thread
coderabbitai[bot] marked this conversation as resolved.
_rebuildTheme();
}

Expand Down
4 changes: 2 additions & 2 deletions apps/design_system_gallery/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ publish_to: 'none'
version: 1.0.0+1

environment:
sdk: ^3.10.0
flutter: ">=3.38.1"
sdk: ^3.12.0
flutter: ">=3.44.0"
Comment thread
VelikovPetar marked this conversation as resolved.

dependencies:
device_frame_plus: ^1.0.0
Expand Down
4 changes: 2 additions & 2 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ command:
bootstrap:
# Dart and Flutter environment used in the project.
environment:
sdk: ^3.10.0
sdk: ^3.12.0
# We are not using carat '^' syntax here because flutter don't follow semantic versioning.
flutter: ">=3.38.1"
flutter: ">=3.44.0"

# List of all the dependencies used in the project.
dependencies:
Expand Down
4 changes: 4 additions & 0 deletions packages/stream_core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

- Added `teams` field to `User` class.

### 🔄 Changed

- Raised the minimum Dart SDK to `^3.12.0`.

## 0.4.0

### 💥 BREAKING CHANGES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extension StreamDioExceptionExtension on DioException {
final apiErrorResult = runSafelySync(
() => switch (response?.data) {
final Map<String, Object?> data => StreamApiError.fromJson(data),
final String data => StreamApiError.fromJson(jsonDecode(data)),
final String data => StreamApiError.fromJson(jsonDecode(data) as Map<String, Object?>),
_ => null,
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import 'system_environment.dart';
class SystemEnvironmentManager {
/// {@macro systemEnvironmentManager}
SystemEnvironmentManager({
required SystemEnvironment environment,
}) : _environment = environment;
required this._environment,
});

/// Returns the Stream client user agent string based on the current
/// [environment] value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class AttachmentUploadException implements Exception {
class StreamAttachmentUploader {
/// Creates a [StreamAttachmentUploader] with the specified [cdn] client.
const StreamAttachmentUploader({
required CdnClient cdn,
}) : _cdn = cdn;
required this._cdn,
});
Comment thread
coderabbitai[bot] marked this conversation as resolved.

// The CDN client used for upload operations.
final CdnClient _cdn;
Expand Down
4 changes: 2 additions & 2 deletions packages/stream_core/lib/src/user/token_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class TokenManager {
/// The [tokenProvider] is used to load tokens when needed.
TokenManager({
required this.userId,
required TokenProvider tokenProvider,
}) : _tokenProvider = tokenProvider;
required this._tokenProvider,
});
Comment thread
coderabbitai[bot] marked this conversation as resolved.

/// The unique identifier of the user whose tokens are managed.
final String userId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,9 @@ class StreamWebSocketEngine<Inc, Out> implements WebSocketEngine<Out> {
/// Creates a new instance of [StreamWebSocketEngine].
StreamWebSocketEngine({
WebSocketProvider? wsProvider,
WebSocketEngineListener<Inc>? listener,
required WebSocketMessageCodec<Inc, Out> messageCodec,
}) : _wsProvider = wsProvider ?? _createWebSocket,
_messageCodec = messageCodec,
_listener = listener;
this._listener,
required this._messageCodec,
}) : _wsProvider = wsProvider ?? _createWebSocket;
Comment thread
coderabbitai[bot] marked this conversation as resolved.

final WebSocketProvider _wsProvider;
final WebSocketMessageCodec<Inc, Out> _messageCodec;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,11 @@ class ConnectionRecoveryHandler extends Disposable {
required StreamWebSocketClient client,
NetworkStateProvider? networkStateProvider,
LifecycleStateProvider? lifecycleStateProvider,
bool keepConnectionAliveInBackground = false,
this._keepConnectionAliveInBackground = false,
List<AutomaticReconnectionPolicy>? policies,
RetryStrategy? retryStrategy,
}) : _client = client,
_reconnectStrategy = retryStrategy ?? RetryStrategy(),
_keepConnectionAliveInBackground = keepConnectionAliveInBackground,
_policies = <AutomaticReconnectionPolicy>[
...?policies,
WebSocketAutomaticReconnectionPolicy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ abstract interface class WebSocketHealthListener {
class WebSocketHealthMonitor {
/// Creates a new instance of [WebSocketHealthMonitor].
WebSocketHealthMonitor({
required WebSocketHealthListener listener,
required this._listener,
this.pingInterval = const Duration(seconds: 25),
this.timeoutThreshold = const Duration(seconds: 3),
}) : _listener = listener;
});

/// The interval between ping requests for health checking.
final Duration pingInterval;
Expand Down
2 changes: 1 addition & 1 deletion packages/stream_core/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repository: https://github.com/GetStream/stream-core-flutter
# 2. Add it to the melos.yaml file for future updates.

environment:
sdk: ^3.10.0
sdk: ^3.12.0

dependencies:
collection: ^1.19.0
Expand Down
6 changes: 6 additions & 0 deletions packages/stream_core_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Upcoming

### 🔄 Changed

- Raised the minimum Flutter version to `>=3.44.0` and the Dart SDK to `^3.12.0`.

## 0.5.0

### ✨ Features
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,28 +494,20 @@ class _RenderStreamIntrinsicFlex extends RenderBox
ContainerRenderObjectMixin<RenderBox, _IntrinsicFlexParentData>,
RenderBoxContainerDefaultsMixin<RenderBox, _IntrinsicFlexParentData> {
_RenderStreamIntrinsicFlex({
required Axis direction,
required MainAxisAlignment mainAxisAlignment,
required MainAxisSize mainAxisSize,
required double spacing,
required this._direction,
required this._mainAxisAlignment,
required this._mainAxisSize,
required this._spacing,
required CrossAxisAlignment crossAxisAlignment,
required TextBaseline? textBaseline,
required TextDirection? textDirection,
required VerticalDirection verticalDirection,
required Clip clipBehavior,
required this._textBaseline,
required this._textDirection,
required this._verticalDirection,
required this._clipBehavior,
}) : assert(
crossAxisAlignment != CrossAxisAlignment.stretch,
'StreamIntrinsicFlex does not support $crossAxisAlignment.',
),
_direction = direction,
_mainAxisAlignment = mainAxisAlignment,
_mainAxisSize = mainAxisSize,
_spacing = spacing,
_crossAxisAlignment = crossAxisAlignment,
_textBaseline = textBaseline,
_textDirection = textDirection,
_verticalDirection = verticalDirection,
_clipBehavior = clipBehavior;
_crossAxisAlignment = crossAxisAlignment;
Comment thread
coderabbitai[bot] marked this conversation as resolved.

Axis get direction => _direction;
Axis _direction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ class StreamSafeArea extends StatelessWidget {
/// clamped to `[0, 1]`.
const StreamSafeArea.driven({
super.key,
required ValueListenable<double> listenable,
EdgeInsets to = EdgeInsets.zero,
required ValueListenable<double> this._listenable,
this._to = EdgeInsets.zero,
this.left = true,
this.top = true,
this.right = true,
Expand All @@ -83,8 +83,7 @@ class StreamSafeArea extends StatelessWidget {
this.margin = EdgeInsets.zero,
this.maintainBottomViewPadding = false,
required this.child,
}) : _listenable = listenable,
_to = to;
});

/// Whether to avoid system intrusions on the left ([minimum] and [margin] apply either way).
final bool left;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,11 @@ class StreamTapTargetPadding extends SingleChildRenderObjectWidget {

class _RenderTapTargetPadding extends RenderShiftedBox {
_RenderTapTargetPadding({
required Size minSize,
required AlignmentGeometry alignment,
required TextDirection? textDirection,
required this._minSize,
required this._alignment,
required this._textDirection,
RenderBox? child,
}) : _minSize = minSize,
_alignment = alignment,
_textDirection = textDirection,
super(child);
}) : super(child);

Size get minSize => _minSize;
Size _minSize;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -656,9 +656,9 @@ class StreamSheetRoute<T> extends PageRoute<T> {
super.requestFocus,
required this.builder,
this.backgroundColor,
Color? barrierColor,
this._barrierColor,
this.barrierLabel,
String? barrierOnTapHint,
this._barrierOnTapHint,
Comment thread
coderabbitai[bot] marked this conversation as resolved.
this.shape,
this.borderRadius,
this.constraints,
Expand All @@ -672,8 +672,7 @@ class StreamSheetRoute<T> extends PageRoute<T> {
this.onDragEnd,
this.parentSheet,
this.capturedThemes,
}) : _barrierColor = barrierColor,
_barrierOnTapHint = barrierOnTapHint;
});

/// Builds the primary contents of the sheet. The provided [ScrollController]
/// should be attached to the topmost scrollable widget inside the sheet.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,8 @@ class StreamComponentBuilders with _$StreamComponentBuilders {
final class StreamComponentBuilderExtension<T> {
/// Creates a builder extension for a component with Props type [T].
const StreamComponentBuilderExtension({
required StreamComponentBuilder<T> builder,
}) : _builder = builder;
required this._builder,
});

// The internal builder function that creates the widget from the context and props.
final StreamComponentBuilder<T> _builder;
Expand Down
Loading
Loading