Skip to content

Manual dart sdk flutter 174bcc79 25ff 4267 8e26 d0e902f18681 1771486449#182624

Merged
auto-submit[bot] merged 5 commits intoflutter:masterfrom
gaaclarke:manual-dart-sdk-flutter-174bcc79-25ff-4267-8e26-d0e902f18681-1771486449
Feb 20, 2026
Merged

Manual dart sdk flutter 174bcc79 25ff 4267 8e26 d0e902f18681 1771486449#182624
auto-submit[bot] merged 5 commits intoflutter:masterfrom
gaaclarke:manual-dart-sdk-flutter-174bcc79-25ff-4267-8e26-d0e902f18681-1771486449

Conversation

@gaaclarke
Copy link
Member

@gaaclarke gaaclarke commented Feb 19, 2026

https://dart.googlesource.com/sdk.git/+log/2642761fca94..f8fac50475b8

2026-02-19 [email protected] Version 3.12.0-162.0.dev
2026-02-19 [email protected] Version 3.12.0-161.0.dev

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-sdk-flutter
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@github-actions github-actions bot added the engine flutter/engine related. See also e: labels. label Feb 19, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request addresses issue #182617 by adding // ignore: prefer_initializing_formals comments to several constructors and disabling the prefer_initializing_formals lint rule in engine/src/flutter/analysis_options.yaml. This change effectively suppresses the lint warning for these specific constructors, which is a common practice when dealing with certain Flutter widget patterns. The changes are straightforward and directly target the reported issue.

/// Provides controls to change the zoom level of a [WidgetPreview].
class ZoomControls extends StatelessWidget {
/// Provides controls to change the zoom level of a [WidgetPreview].
// ignore: prefer_initializing_formals
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Adding // ignore: prefer_initializing_formals directly above the constructor is a valid way to suppress this lint for specific cases. This is consistent with the overall approach taken in this PR to address the lint warning.


/// IDE-supplied theming.
final class IdeTheme {
// ignore: prefer_initializing_formals
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The // ignore: prefer_initializing_formals comment is correctly placed to suppress the lint for the IdeTheme constructor. This aligns with the PR's objective to resolve the lint issue.


/// Custom render box that forces constraints onto unconstrained widgets.
class _WidgetPreviewWrapperBox extends RenderShiftedBox {
// ignore: prefer_initializing_formals
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The // ignore: prefer_initializing_formals comment is appropriately added to the _WidgetPreviewWrapperBox constructor, addressing the lint warning for this specific constructor.

/// Controller used to process events and determine which previews should be
/// displayed and how they should be displayed in the [WidgetPreviewScaffold].
class WidgetPreviewScaffoldController {
// ignore: prefer_initializing_formals
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Adding // ignore: prefer_initializing_formals to the WidgetPreviewScaffoldController constructor resolves the lint warning for this class, maintaining consistency with the other changes in this PR.

missing_whitespace_between_adjacent_strings: false # too many false positives
public_member_api_docs: true # dart:ui is public API
use_string_in_part_of_directives: false # needs to be evaluated, dart:ui frequently uses non-strings
prefer_initializing_formals: false # https://github.com/flutter/flutter/issues/182617#issuecomment-3928680061
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Disabling prefer_initializing_formals in the analysis_options.yaml file is a global change that suppresses this lint across the entire engine. While this resolves the immediate issue, it's important to ensure that this lint is not generally desired for other parts of the codebase. The comment linking to the GitHub issue provides good context for this decision.

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 19, 2026
final class IdeTheme {
// ignore: prefer_initializing_formals
const IdeTheme({this.backgroundColor, this.foregroundColor, bool? isDarkMode})
: _isDarkMode = isDarkMode;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lint will fire on this line. If the ignore comment seems to be working where it is, then SGTM, but you may need to move it to the end of this line or one line above this one. Likewise below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to reproduce the failure locally to verify. Gemini told me this is the right place for it to go. I originally had it like this:

  const IdeTheme({this.backgroundColor, this.foregroundColor, bool? isDarkMode})
    // ignore: prefer_initializing_formals
    : _isDarkMode = isDarkMode;

Having it at the beginning of the statement makes sense to me since there can be multiple instances of initializers, I'm not sure if the analyzer agrees.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved them, the old position didn't work as suspected. It is weird because in that one case we have 2 initializers, but only one lint failure is issued. I'm guessing one ignore is sufficient since only one failure was issued.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 19, 2026
@auto-submit
Copy link
Contributor

auto-submit bot commented Feb 19, 2026

autosubmit label was removed for flutter/flutter/182624, because - The status or check suite Mac_arm64 tool_tests_commands has failed. Please fix the issues identified (or deflake) before re-applying this label.

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 19, 2026
@auto-submit
Copy link
Contributor

auto-submit bot commented Feb 19, 2026

autosubmit label was removed for flutter/flutter/182624, because - The status or check suite Linux tool_tests_widget_preview_scaffold has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 19, 2026
@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 19, 2026
@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 19, 2026
@gaaclarke gaaclarke added this pull request to the merge queue Feb 19, 2026
Copy link
Contributor

@munificent munificent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for fixing what I broke and unblocking the roll.

super.key,
required TransformationController transformationController,
// ignore: prefer_initializing_formals
}) : _transformationController = transformationController;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style nit, but I'd put the comment outside of the parameter list so it's clearer that it applies to the initializer:

const ZoomControls({
    super.key,
    required TransformationController transformationController,
  }) : // ignore: prefer_initializing_formals
       _transformationController = transformationController;

Likewise elsewhere, but it's up to you.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yea, that's nicer. I unfortunately didn't have a setup where i could reproduce the problem locally so I couldn't play around with it. I didn't know the analyzer can recognized ignores if there is non-whitespace before the comment.

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Feb 20, 2026
@auto-submit auto-submit bot added this pull request to the merge queue Feb 20, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Feb 20, 2026
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 20, 2026
@jason-simmons jason-simmons added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 20, 2026
@auto-submit auto-submit bot added this pull request to the merge queue Feb 20, 2026
Merged via the queue into flutter:master with commit 4c020ad Feb 20, 2026
186 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 20, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 21, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 21, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 21, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 22, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 22, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 22, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 23, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 23, 2026
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Feb 23, 2026
flutter/flutter@91b2d41...dad6f9d

2026-02-23 [email protected] Roll Packages from 9da22bf to 12b43a1 (19 revisions) (flutter/flutter#182758)
2026-02-23 [email protected] Roll Skia from 55fae1660572 to 9a5a3c92c336 (7 revisions) (flutter/flutter#182749)
2026-02-23 [email protected] Roll Skia from 256e2b47b303 to 55fae1660572 (1 revision) (flutter/flutter#182741)
2026-02-22 [email protected] Roll Skia from 141ed451f007 to 256e2b47b303 (1 revision) (flutter/flutter#182732)
2026-02-22 [email protected] Roll Skia from e59de8a12e7e to 141ed451f007 (1 revision) (flutter/flutter#182729)
2026-02-22 [email protected] Roll Skia from f6ea7ef42d14 to e59de8a12e7e (1 revision) (flutter/flutter#182726)
2026-02-22 [email protected] Roll Skia from 34fa7b2373f3 to f6ea7ef42d14 (1 revision) (flutter/flutter#182721)
2026-02-21 [email protected] Roll Skia from 3ca547c8b816 to 34fa7b2373f3 (2 revisions) (flutter/flutter#182711)
2026-02-21 [email protected] Roll Skia from c91ad88e89f8 to 3ca547c8b816 (9 revisions) (flutter/flutter#182696)
2026-02-21 [email protected] Shortcircuit if Tooltip message and richMessage are empty (flutter/flutter#182524)
2026-02-21 [email protected] Add fields getter to FormState (flutter/flutter#180815)
2026-02-20 [email protected] fix(web_ui): use static whitelist for image codec tests (flutter/flutter#182648)
2026-02-20 [email protected] Add cupertino docimports for CupertinoPageTransitionsBuilder and fix typos (flutter/flutter#182685)
2026-02-20 [email protected] Fix Chat invite link (flutter/flutter#182675)
2026-02-20 [email protected] Roll Skia from ce5854495a3a to c91ad88e89f8 (58 revisions) (flutter/flutter#182678)
2026-02-20 [email protected] Manual dart sdk flutter 174bcc79 25ff 4267 8e26 d0e902f18681 1771486449 (flutter/flutter#182624)
2026-02-20 [email protected] Don't compile shaders to SkSL unless --sksl arg is present (flutter/flutter#182519)
2026-02-20 [email protected] Correct PerformanceOverlay optionsMask checks and add tests (flutter/flutter#182309)
2026-02-20 [email protected] [Impeller] libImpeller: Dispose thread local caches on each Vulkan frame (flutter/flutter#182402)
2026-02-20 [email protected] Update CHANGELOG for 3.41.2 stable hotfix (flutter/flutter#182647)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
ahmedsameha1 pushed a commit to ahmedsameha1/flutter that referenced this pull request Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine flutter/engine related. See also e: labels. tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dart roller blocked on new lint semantics (prefer_initializing_formals)

5 participants