-
Notifications
You must be signed in to change notification settings - Fork 0
chore(repo): Upgrade Flutter to >=3.38.1 and enable new lints
#29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main-design-system
Are you sure you want to change the base?
Conversation
This commit upgrades the project to Dart SDK `^3.10.0` and Flutter `>=3.38.1`. It also enables a comprehensive set of new lint rules from `all_lint_rules.yaml` to improve code quality, consistency, and maintainability. The majority of the changes in this commit are automatic fixes and formatting adjustments applied by the Dart formatter and linter to align the codebase with the newly enabled rules. This includes: - Applying `dart format --fix` with a page width of 100 and trailing commas. - Enabling and autofixing new lint rules such as `use_super_parameters`, `unnecessary_lambdas`, `use_if_null_to_convert_nulls_to_bools`, and many others. - Deleting the `analysis_options.yaml` and `.gitignore` from `stream_core_flutter` as they are now handled at the root level. - Updating `melos.yaml` to reflect the new SDK constraints.
The `ui` scope is added to the list of allowed scopes for pull request titles in the `pr_title.yml` workflow. This workflow now validates for `llc`, `ui`, and `repo` scopes. Additionally, a temporary comment to remove the `main-design-system` branch is included, and the `semantic_changelog_update` job is enabled.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughThis PR updates Dart/Flutter SDK constraints to ^3.10.0 and >=3.38.1, applies extensive code formatting and style improvements across the stream_core library, updates lint rules configuration, adds resolver support to MutableEventEmitter, refactors the retry strategy with better encapsulation, and modernizes import paths in stream_core_flutter. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Rationale: The PR spans 40+ files with diverse change types (configuration, formatting, and functional edits). While most changes are repetitive formatting with low complexity, there are scattered functional changes requiring attention—particularly in Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (21.15%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main-design-system #29 +/- ##
=====================================================
Coverage ? 40.19%
=====================================================
Files ? 53
Lines ? 1045
Branches ? 0
=====================================================
Hits ? 420
Misses ? 625
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/stream_core/lib/src/user/token_manager.dart (1)
43-46: Bug: Setter compares against immutable field and never updates it.The
tokenProvidersetter compares against_tokenProviderwhich is declaredfinal(line 42). The comparison will work, but:
- The provider is never actually updated since
_tokenProvideris immutable- The setter effectively only calls
expireToken()on first invocation (when providers differ), but subsequent calls have no lasting effectIf this setter is intended to allow changing the token provider,
_tokenProvidershould not befinal. If the provider is meant to be immutable, this setter should be removed.Proposed fix if provider should be mutable
- // The provider used to load tokens when needed. - final TokenProvider _tokenProvider; - set tokenProvider(TokenProvider provider) { - // If the provider changes, expire the current token. - if (_tokenProvider != provider) expireToken(); - } + // The provider used to load tokens when needed. + TokenProvider _tokenProvider; + set tokenProvider(TokenProvider provider) { + // If the provider changes, expire the current token and update. + if (_tokenProvider != provider) { + expireToken(); + _tokenProvider = provider; + } + }
🤖 Fix all issues with AI agents
In `@analysis_options.yaml`:
- Around line 17-19: The formatter settings in analysis_options.yaml use
page_width (requires Dart ≥3.7) and trailing_commas: preserve (requires Dart
≥3.8), so update the project's SDK constraints and CI to match: bump the
environment SDK lower bound to at least 3.8.0 in pubspec.yaml (environment: sdk)
and ensure any CI/workflow actions or Docker images use Dart 3.8+ so the
analyzer/formatter won't error when running format or static analysis; reference
the keys page_width and trailing_commas in analysis_options.yaml and the
environment: sdk in pubspec.yaml when making the changes.
In `@packages/stream_core/pubspec.yaml`:
- Around line 18-19: The SDK constraint in the pubspec (the environment: sdk:
^3.10.0 entry) is too strict for Flutter 3.38's pre-release Dart and should be
adjusted; either loosen the constraint to accept the pre-release range (e.g.,
change the sdk spec to allow 3.10.0-290.0.beta or a caret range that includes
it), or confirm you will target a Flutter version that bundles stable Dart
3.10.0+ and leave the constraint as-is—update the environment sdk value
accordingly in packages/stream_core/pubspec.yaml to reflect the chosen approach.
🧹 Nitpick comments (2)
packages/stream_core/lib/src/ws/client/stream_web_socket_client.dart (1)
92-92: Consider removing or replacingprint()statements with structured logging.There are
print()calls at lines 92, 219, and 242 that appear to be debug artifacts. These should either be removed before production release or replaced with a proper logging mechanism that can be configured by severity level.packages/stream_core/lib/src/logger/stream_log.dart (1)
1-2: Minor style inconsistency between ignore directive and applied changes.The
omit_obvious_property_typesdirective is suppressed file-wide, yet_instanceon line 14 had its type annotation removed (aligning with the lint). Meanwhile, fields on lines 16-19 retain explicit types (which is why the directive is needed). This mix of inferred vs. explicit types is slightly inconsistent but functionally correct.Also applies to: 14-14
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (55)
.github/workflows/pr_title.ymlall_lint_rules.yamlanalysis_options.yamlapps/design_system_gallery/pubspec.yamlmelos.yamlpackages/stream_core/lib/src/api/interceptors/logging_interceptor.dartpackages/stream_core/lib/src/api/stream_core_dio_error.dartpackages/stream_core/lib/src/attachment/uploader/attachment_uploader.dartpackages/stream_core/lib/src/errors/stream_api_error.dartpackages/stream_core/lib/src/errors/stream_api_error.g.dartpackages/stream_core/lib/src/logger/impl/external_logger.dartpackages/stream_core/lib/src/logger/impl/file_logger.dartpackages/stream_core/lib/src/logger/stream_log.dartpackages/stream_core/lib/src/logger/stream_logger.dartpackages/stream_core/lib/src/platform/current_platform.dartpackages/stream_core/lib/src/query/filter/filter.dartpackages/stream_core/lib/src/query/filter/location/bounding_box.g.dartpackages/stream_core/lib/src/query/filter/location/circular_region.g.dartpackages/stream_core/lib/src/query/filter/location/location_coordinate.dartpackages/stream_core/lib/src/query/sort.dartpackages/stream_core/lib/src/query/sort.g.dartpackages/stream_core/lib/src/user/connect_user_details_request.g.dartpackages/stream_core/lib/src/user/token_manager.dartpackages/stream_core/lib/src/user/user.dartpackages/stream_core/lib/src/user/user_token.dartpackages/stream_core/lib/src/user/ws_auth_message_request.g.dartpackages/stream_core/lib/src/utils/comparable_field.dartpackages/stream_core/lib/src/utils/disposable.dartpackages/stream_core/lib/src/utils/event_emitter.dartpackages/stream_core/lib/src/utils/result.dartpackages/stream_core/lib/src/utils/shared_emitter.dartpackages/stream_core/lib/src/utils/state_emitter.dartpackages/stream_core/lib/src/ws/client/engine/stream_web_socket_engine.dartpackages/stream_core/lib/src/ws/client/engine/web_socket_engine.dartpackages/stream_core/lib/src/ws/client/reconnect/automatic_reconnection_policy.dartpackages/stream_core/lib/src/ws/client/reconnect/connection_recovery_handler.dartpackages/stream_core/lib/src/ws/client/reconnect/retry_strategy.dartpackages/stream_core/lib/src/ws/client/stream_web_socket_client.dartpackages/stream_core/lib/src/ws/client/web_socket_connection_state.dartpackages/stream_core/lib/src/ws/events/ws_request.dartpackages/stream_core/pubspec.yamlpackages/stream_core/test/query/filter_test.dartpackages/stream_core/test/query/list_extensions_test.dartpackages/stream_core/test/query/sort_test.dartpackages/stream_core/test/utils/event_emitter_test.dartpackages/stream_core/test/utils/shared_emitter_test.dartpackages/stream_core/test/utils/state_emitter_test.dartpackages/stream_core_flutter/.gitignorepackages/stream_core_flutter/analysis_options.yamlpackages/stream_core_flutter/lib/src/components/stream_button.dartpackages/stream_core_flutter/lib/src/theme/components/stream_button_theme.dartpackages/stream_core_flutter/lib/src/theme/stream_component_factory.dartpackages/stream_core_flutter/lib/src/theme/stream_theme.dartpackages/stream_core_flutter/lib/stream_core_flutter.dartpackages/stream_core_flutter/pubspec.yaml
💤 Files with no reviewable changes (2)
- packages/stream_core_flutter/analysis_options.yaml
- packages/stream_core_flutter/.gitignore
🔇 Additional comments (101)
packages/stream_core/lib/src/api/stream_core_dio_error.dart (1)
16-18: LGTM! Formatting adjustment aligns with project standards.The indentation changes to the
super()constructor call are purely cosmetic and follow the formatting applied bydart format --fixas part of the Flutter upgrade.packages/stream_core/lib/src/logger/stream_logger.dart (2)
1-15: LGTM!The explicit type annotations for
_priorityEmojiMapperand_priorityNameMapperimprove code clarity and align with the new lint rules. The types are correct and match the map contents.
44-45: LGTM!The enum trailing semicolon placement on its own line is a valid formatting style applied by
dart format --fix. No functional change.packages/stream_core/lib/src/platform/current_platform.dart (2)
1-1: LGTM!The single-line conditional import correctly uses the
dart.library.iodirective to select the appropriate platform detector implementation.
89-90: LGTM!The semicolon placement on its own line is the expected output from
dart format --fixwith trailing commas enabled, consistent with the PR's formatting objectives.packages/stream_core/lib/src/utils/comparable_field.dart (2)
44-44: LGTM: Class declaration formatting improved.The single-line class declaration enhances readability while maintaining all type constraints and interfaces.
85-87: LGTM: Error handling formatting improved.The trailing comma addition follows Dart formatting conventions and maintains the error message clarity.
packages/stream_core/lib/src/user/user.dart (3)
19-20: LGTM: Consistent initializer list formatting.The spacing adjustment in the initializer list improves readability and aligns with the new formatting rules.
25-25: LGTM: Concise single-line constructor.The guest constructor is now more concise while remaining readable within the 100-character page width.
57-63: LGTM: Improved props list formatting.Formatting each property on its own line with trailing commas follows Dart best practices and makes future diffs cleaner when properties are added or removed.
packages/stream_core/lib/src/utils/result.dart (3)
94-102: LGTM!The multi-line formatting improves readability. The
getOrThrow()implementation correctly preserves the original stack trace usingError.throwWithStackTrace.
183-192: LGTM!Formatting-only change consistent with the lint upgrade.
199-208: LGTM!Formatting-only change consistent with the lint upgrade.
packages/stream_core/lib/src/ws/events/ws_request.dart (1)
17-23: LGTM! Clean use of Dart 3.x null-aware element syntax.The
?connectionIdsyntax correctly omits the'client_id'entry whenconnectionIdis null, and includes it only when non-null. This is the idiomatic approach for conditional map entries in modern Dart.Note: The AI summary incorrectly states this "always includes client_id" — in fact, the null-aware element syntax (
?) ensures the key is conditionally included only when the value is non-null.packages/stream_core/lib/src/attachment/uploader/attachment_uploader.dart (2)
115-119: LGTM! Formatting improves readability.The typedef has been reformatted to a multi-line style, placing each parameter on its own line. This is consistent with the PR's automatic formatting objectives and improves readability without changing the signature.
154-155: LGTM! Lambda formatting is consistent.The lambda expression has been reformatted to place the inner function on a new line, improving readability while preserving the functional behavior of passing the attachment ID along with progress updates.
packages/stream_core/lib/src/utils/disposable.dart (2)
1-1: LGTM - lint ignores are appropriate for this pattern.The
FutureOr<void>return type allows subclasses to implement either synchronous or asynchronous disposal, and theasynckeyword on the base method is a common pattern for overrideable disposal methods.
11-11: LGTM - type inference change is functionally equivalent.The type is correctly inferred as
boolfrom the initializer. This stylistic change aligns with the lint rules being enabled in this PR.packages/stream_core/lib/src/api/interceptors/logging_interceptor.dart (5)
58-61: LGTM!The removal of explicit type annotations on these
static constdeclarations is appropriate. The types are clearly inferrable from the initializers (intfor1,Stringfor the tab string), aligning with Dart's style recommendations for obvious type inference.
157-157: LGTM!The single-line arrow form for this simple lambda is more concise and appropriate for the straightforward assignment operation.
221-225: LGTM!Converting
_printLineto expression-body syntax is appropriate since the method contains only a single expression. This is idiomatic Dart style.
298-303: LGTM!The reformatted
logPrintcall improves readability by breaking up the complex string interpolation with the nestedsubstringcall across multiple lines.
352-356: LGTM!Converting
_logPrintRequestand_logPrintResponseto single-line arrow form is appropriate for these simple delegation methods and brings them in line with_logPrintErrorwhich was already in this form.packages/stream_core/lib/src/query/filter/location/location_coordinate.dart (1)
82-83: LGTM!Formatting-only change to split the long line. The Haversine formula calculation remains mathematically correct.
packages/stream_core/lib/src/errors/stream_api_error.dart (2)
57-69: LGTM!Formatting adjustments for
fromJsonandpropsgetter align with the 100-character page width and trailing comma conventions.
72-73: LGTM!Adding explicit
List<int>type annotations improves code clarity and aligns with the new lint rules.packages/stream_core/lib/src/user/user_token.dart (1)
115-116: LGTM!Standard enum formatting with the semicolon on a separate line for enhanced enums. No behavioral change.
packages/stream_core/lib/src/errors/stream_api_error.g.dart (1)
9-31: LGTM!Formatting-only changes in generated serialization code. All field mappings and JSON keys remain correct and unchanged.
packages/stream_core/lib/src/query/filter/location/circular_region.g.dart (1)
9-13: LGTM!Formatting-only change in generated serialization code. The JSON structure with
lat,lng, anddistancekeys remains unchanged.packages/stream_core/lib/src/ws/client/engine/stream_web_socket_engine.dart (1)
39-41: LGTM!The initializer list formatting aligns with Dart's standard style. No functional changes.
packages/stream_core/lib/src/query/filter/location/bounding_box.g.dart (1)
9-14: LGTM!Generated code reformatted by
json_serializable. No changes to serialization logic or field mappings.packages/stream_core/lib/src/user/connect_user_details_request.g.dart (1)
9-17: LGTM!Generated code reformatted by
json_serializable. Function signature consolidated to single line; serialization logic unchanged.packages/stream_core/test/utils/shared_emitter_test.dart (3)
87-96: LGTM!Test description reformatted to single line. No changes to test logic or assertions.
411-427: LGTM!Test description reformatted to single line. Test behavior unchanged.
429-445: LGTM!Test description reformatted to single line. Test behavior unchanged.
packages/stream_core/lib/src/utils/shared_emitter.dart (1)
101-119: LGTM!Class declaration consolidated to single line within the 100-character page width. No API or behavioral changes.
packages/stream_core/lib/src/user/ws_auth_message_request.g.dart (1)
9-17: LGTM!This is a formatting-only change in generated code. The
_$WsAuthMessageRequestToJsonfunction signature was reformatted to a single line, consistent with the PR'sdart format --fixapplication.packages/stream_core/test/query/list_extensions_test.dart (1)
1-2055: LGTM!This comprehensive test file has only formatting changes applied via
dart format --fix. All test logic, assertions, and expectations remain unchanged. The modifications include:
- Lambda expressions moved to single lines (e.g., line 268, 289)
- Method chains consolidated to single lines (e.g., lines 698, 708)
- String interpolations reformatted for 100-character line width
The test coverage for
upsert,updateWhere,batchReplace,partition,sortedInsert,insertUnique,sortedUpsert,merge,removeNested, andupdateNestedis thorough.packages/stream_core/lib/src/query/filter/filter.dart (10)
1-2: Lint suppression formatching_super_parametersadded.The
// ignore_for_file: matching_super_parametersdirective suppresses warnings about parameter names in constructors not matching their super constructor parameters. This is appropriate here since the comparison operators usesuper.field, super.valuewhich are positional and don't need to match by name.
244-267: LGTM!The
EqualOperatorconstructor was reformatted to a single line. Thematches()implementation correctly handles:
- Null value checks (PostgreSQL semantics)
- Location coordinate special cases
- Deep equality comparison
No functional changes.
275-291: LGTM!The
GreaterOperatorconstructor formatting change is consistent with the PR's formatting standards. The comparison logic usingComparableFieldand safe execution remains intact.
296-313: LGTM!Formatting-only changes to
GreaterOrEqualOperator. The initializer list now uses the new Dart 3 syntax with:on the next line, which is valid and consistent with the formatter output.
318-334: LGTM!
LessOperatorconstructor reformatted to single line. Logic unchanged.
339-356: LGTM!
LessOrEqualOperatorformatting consistent with other comparison operators.
395-410: LGTM!
InOperatorconstructor formatting adjusted. The membership test logic remains correct.
420-432: LGTM!
ContainsOperatorreformatted to single line. Containment logic unchanged.
508-522: LGTM!
QueryOperatorconstructor on single line. Full-text search logic intact.
527-546: LGTM!
AutoCompleteOperatorformatting changes. The word prefix matching implementation remains correct with proper Unicode support for punctuation boundaries.packages/stream_core/test/query/filter_test.dart (1)
1-2148: LGTM!This extensive test file covering all filter operators has formatting-only changes. The modifications consolidate method chains (e.g.,
.matches(model)) to single lines and reflow array literals to fit within the 100-character line width.Test coverage is comprehensive, including:
- Comparison operators (Equal, Greater, GreaterOrEqual, Less, LessOrEqual)
- List operators (In, Contains)
- Existence operator
- Evaluation operators (Query, AutoComplete)
- Path existence operator
- Logical operators (And, Or)
- Location filtering (CircularRegion, BoundingBox)
- Edge cases and PostgreSQL NULL semantics
All test assertions and expectations remain unchanged.
packages/stream_core/test/utils/state_emitter_test.dart (5)
28-35: LGTM!The
asyncmodifier was correctly removed from this test since it doesn't contain anyawaitcalls. The test synchronously emits a value and verifies the state update.
37-44: LGTM!Same pattern -
asyncappropriately removed as this test is fully synchronous.
118-125: LGTM!The
updateatomic method test correctly converted to synchronous.
127-135: LGTM!The
getAndUpdatetest correctly converted to synchronous.
137-145: LGTM!The
updateAndGettest correctly converted to synchronous. All atomic update method tests are now appropriately marked as synchronous since they don't require awaiting any futures.packages/stream_core/lib/src/utils/state_emitter.dart (1)
74-74: LGTM!Formatting change aligns with the new 100-character page width setting. No semantic changes to the class declaration.
packages/stream_core/lib/src/query/sort.dart (3)
18-19: LGTM!Valid Dart enum formatting. The semicolon on its own line is acceptable style when using trailing commas.
36-36: LGTM!Trailing comma in enum is consistent with Dart formatting conventions.
48-54: LGTM!Multi-line typedef formatting improves readability for this function signature with multiple parameters.
packages/stream_core/lib/src/query/sort.g.dart (1)
9-12: LGTM!Generated code reformatted by
build_runnerwith new formatting settings. No semantic changes to serialization output.packages/stream_core/lib/src/ws/client/web_socket_connection_state.dart (2)
19-19: LGTM!Typedef formatting adjusted to single line, consistent with 100-character page width.
106-121: LGTM!Switch expression restructured for better readability. The
DisconnectionSourcesubtypes are now explicit top-level branches within theDisconnectedcase, leveraging Dart 3's exhaustive pattern matching on sealed classes. The reconnection logic remains equivalent:
ServerInitiated: Disables reconnection for code 1000, token expired, and client errors; enables for othersUnHealthyConnection/SystemInitiated: Enables reconnectionUserInitiated: Disables reconnectionpackages/stream_core/lib/src/ws/client/engine/web_socket_engine.dart (1)
184-185: LGTM!Constructor initializer list formatting adjusted. The null-coalescing defaults (
reason ?? 'Unknown',code ?? 0) remain unchanged.packages/stream_core/test/query/sort_test.dart (1)
123-124: LGTM! Formatting changes align with PR objectives.These are cosmetic formatting adjustments (collapsing multi-line initializations to single-line expressions) consistent with the
dart format --fixapplied across the repository. No functional changes to test logic.Also applies to: 157-157, 174-174, 442-442
packages/stream_core/lib/src/user/token_manager.dart (1)
71-87: LGTM! The async removal is correct.Removing the
asynckeyword is appropriate since the method body directly returns theFuturefromsynchronized(). The semantics remain identical—callers still receive aFuture<UserToken>.packages/stream_core/lib/src/ws/client/stream_web_socket_client.dart (4)
43-43: LGTM! Formatting adjustment for class declaration.The
implementsclause moved to the same line as the class header is consistent with the formatting changes across the PR.
83-86: LGTM! Explicit type annotation improves clarity.Adding the explicit
MutableStateEmitter<WebSocketConnectionState>type annotation improves code readability and IDE support without changing behavior.
124-124: LGTM! Wildcard parameter updated to modern Dart convention.The change from
( _, __)to( _, _)aligns with Dart 3.x wildcard patterns. Using_for unused parameters is the idiomatic approach.
165-169: LGTM! Formatting adjustment.Minor alignment/spacing changes with no semantic impact.
packages/stream_core/lib/src/utils/event_emitter.dart (2)
60-61: LGTM! Formatting adjustment for class declaration.The class declaration spanning two lines aligns with the formatting standards applied across the PR.
67-84: LGTM! Well-designed resolver chain implementation.The resolver functionality is cleanly implemented:
- Constructor properly defaults to empty iterable when no resolvers provided
- The emit logic correctly applies resolvers in order, using the first non-null transformation
- Falls back to emitting the original event when no resolver matches
The chain-of-responsibility pattern here is appropriate for event transformation use cases.
packages/stream_core/test/utils/event_emitter_test.dart (1)
129-129: LGTM! Formatting adjustment aligns with PR standards.The test string moved to the same line as the
test()call is consistent with the formatting changes applied across the repository. Test logic is unchanged.packages/stream_core/lib/src/ws/client/reconnect/connection_recovery_handler.dart (1)
45-61: LGTM!The constructor initializer reformatting looks clean and aligns well with the Dart 3 style. The use of if-case pattern matching (
case final provider?) for nullable checks is idiomatic and the collection-if with spread operators for building the policies list is readable.packages/stream_core/lib/src/ws/client/reconnect/automatic_reconnection_policy.dart (3)
15-27: LGTM!The class declaration formatting and implementation are correct. The policy properly checks
isAutomaticReconnectionEnabledfrom the connection state.
32-43: LGTM!Clean implementation checking network connectivity state before allowing reconnection.
70-70: LGTM!Trailing comma on the last enum member aligns with Dart formatting conventions and enables cleaner diffs for future additions.
packages/stream_core/lib/src/ws/client/reconnect/retry_strategy.dart (1)
68-75: Good encapsulation improvement.Converting the mutable public field to a private backing field with a public getter prevents external code from directly modifying
consecutiveFailuresCount. Mutations are now properly channeled throughincrementConsecutiveFailures()andresetConsecutiveFailures().packages/stream_core/lib/src/logger/impl/external_logger.dart (1)
3-10: LGTM!The multi-line formatting of the typedef improves readability without changing semantics.
packages/stream_core/lib/src/logger/impl/file_logger.dart (4)
10-15: LGTM!Removing explicit
Stringtype annotations from these constants aligns with theomit_obvious_property_typeslint. Type inference handles these trivially.
29-29: LGTM!Removing
asyncis correct. TheFinalizercallback signature isvoid Function(T), so theFuture<void>returned byclose()is discarded regardless. Droppingasyncremoves unnecessary async state machine overhead.
75-75: LGTM!Formatting adjustments from
dart format --fixwith the new line width. No semantic changes.Also applies to: 120-122, 140-142, 168-171
178-181: LGTM!The multi-line array literal improves readability while preserving the same filtering and sorting logic.
packages/stream_core_flutter/lib/stream_core_flutter.dart (1)
1-3: LGTM!The export reordering is a minor organizational change that groups theme-related exports together logically. No functional impact.
apps/design_system_gallery/pubspec.yaml (2)
6-7: SDK constraint update is consistent.The Dart SDK constraint update to
^3.10.0aligns with other packages in the monorepo.
25-25: Remove this comment — no downgrade is evident.The file currently shows
build_runner: ^2.4.15, and git history shows this version has been present in the only commit that modified this file. There is no evidence of a previous version^2.10.4in the repository history.Likely an incorrect or invalid review comment.
packages/stream_core_flutter/pubspec.yaml (1)
6-8: SDK constraints updated appropriately.The Dart SDK constraint
^3.10.0is consistent across the monorepo. The Flutter constraint bump from>=1.17.0to>=3.38.1is a significant change that aligns with the PR objective to leverage Flutter 3.38.1 features and new lint rules.packages/stream_core_flutter/lib/src/theme/stream_theme.dart (2)
1-4: Import reorganization looks good.The switch to relative imports for internal package files and the separation of framework vs. local imports is a reasonable organizational choice, likely driven by lint rules.
11-12: Constructor formatting is lint-compliant.The initializer list formatting with aligned colons is consistent with the PR's
dart format --fixapplication.melos.yaml (2)
8-8: LGTM!Adding
apps/**to the packages list properly includes the design system gallery app in the monorepo workspace.
15-17: SDK constraints are appropriately permissive and will accept the latest Dart and Flutter versions.The version constraints use
>=operators, which correctly allow for Dart 3.10.4 and Flutter 3.38.6 (the current latest stable releases as of January 2026) in addition to the specified minimums. The comment about Flutter not following semantic versioning correctly justifies avoiding^syntax.packages/stream_core_flutter/lib/src/theme/components/stream_button_theme.dart (1)
2-2: LGTM!The switch to relative imports is consistent with the project's lint configuration (
always_use_package_imports: false) and aligns with changes across other files in this PR.analysis_options.yaml (1)
98-109: LGTM!The disabled lint rules have appropriate justifications:
specify_nonobvious_*rules conflict withomit_local_variable_typesas notedunsafe_variancecan produce false positives in valid generic codedocument_ignoresadds verbosity without significant value for this projectprefer_constructors_over_static_methodsallows flexibility for factory patterns.github/workflows/pr_title.yml (2)
22-25: LGTM!Adding the
uiscope appropriately supports design system related PRs with conventional commit validation.
36-39: Consider adding auiscope mapping for design system changelog tracking.The
conventional_pr_titlejob now validatesuias a valid scope (Line 24), butsemantic_changelog_updateonly mapsllcto a package path. If UI-scoped PRs should also update a changelog, consider adding the mapping:scopes: | { "llc": "packages/stream_core", "ui": "packages/stream_core_flutter" }If
ui-scoped PRs intentionally don't require changelog updates, this can be ignored.packages/stream_core_flutter/lib/src/theme/stream_component_factory.dart (1)
2-6: LGTM!The relative import change is consistent with the project's convention. The typedef reformatting to a single line improves readability without changing behavior.
packages/stream_core_flutter/lib/src/components/stream_button.dart (3)
2-4: LGTM! Relative imports align with lint configuration.The switch from package imports to relative imports is consistent with the
prefer_relative_importslint rule enabled in this PR.
56-57: LGTM! Clean constructor using modern Dart syntax.The new public constructor uses
super.keyappropriately, aligning with theuse_super_parameterslint rule.
100-106: Update minimum SDK version in review comment: null-aware elements require Dart 3.8, not 3.10.The
?props.iconLeftand?props.iconRightsyntax uses Dart 3.8's null-aware elements feature (not 3.10), which conditionally includes elements only when non-null. Thestream_core_flutterpackage already enforces the correct constraint withsdk: ^3.10.0, which satisfies this requirement. However, note that the root workspace constraint (sdk: ^3.6.2) permits older Dart versions; ensure this doesn't cause issues for developers working with the workspace.Likely an incorrect or invalid review comment.
all_lint_rules.yaml (4)
101-112: LGTM! New type inference lint rules for Dart 3.x.The additions of
no_literal_bool_comparisons,omit_obvious_local_variable_types, andomit_obvious_property_typesare appropriate for modern Dart and help reduce verbosity while maintaining clarity.
227-227: Aligns with null-aware element usage in stream_button.dart.The
use_null_aware_elementsrule corresponds to the?props.iconLeftsyntax used in the button component, ensuring consistent adoption of this Dart 3.x feature.
1-10: The conflicting lint rules you identified are present at the correct line numbers inall_lint_rules.yaml, but they are already properly resolved inanalysis_options.yaml.The file includes
all_lint_rules.yamlas a reference catalog and deliberately disables the conflicting rules:
prefer_double_quotes: false(line 39) — keepsprefer_single_quotesalways_specify_types: false(line 45) — keepsomit_local_variable_typesalways_use_package_imports: false(line 80) — keepsprefer_relative_importsprefer_final_parameters: false(line 93) — keepsavoid_final_parametersEach disabled rule includes an explanatory comment. The design is intentional:
all_lint_rules.yamlserves as a complete reference, whileanalysis_options.yaml(lines 9-11) explicitly acknowledges that conflicts are resolved by selectively disabling rules.
172-175: Bothstrict_top_level_inferenceandswitch_on_typelint rules are available in Dart 3.10.0. Thestrict_top_level_inferencerule was introduced in Dart 3.7, andswitch_on_typewas introduced in Dart 3.9. No compatibility issues with the Dart version.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
This commit refactors the `design_system_gallery` app by: - Deleting the `.gitignore` files in the root and `macos` directories. - Removing the `analysis_options.yaml` file. - Cleaning up the `pubspec.yaml` file by reordering dependencies and removing `flutter_lints`. - Adding `const` modifiers to widgets and expressions throughout the app for improved performance. - Making minor code style adjustments, such as reordering imports and simplifying a callback function.
Description of the pull request
This commit upgrades the project to Dart SDK
^3.10.0and Flutter>=3.38.1. It also enables a comprehensive set of new lint rules fromall_lint_rules.yamlto improve code quality, consistency, and maintainability.The majority of the changes in this commit are automatic fixes and formatting adjustments applied by the Dart formatter and linter to align the codebase with the newly enabled rules. This includes:
dart format --fixwith a page width of 100 and trailing commas.use_super_parameters,unnecessary_lambdas,use_if_null_to_convert_nulls_to_bools, and many others.analysis_options.yamland.gitignorefromstream_core_flutteras they are now handled at the root level.melos.yamlto reflect the new SDK constraints.Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.