Skip to content

Fix unresolved doc comment references - #193087

Merged
szakarias merged 2 commits into
flutter:masterfrom
szakarias:fix-unresolved-doc-references
Sep 23, 2026
Merged

szakarias merged 2 commits into
flutter:masterfrom
szakarias:fix-unresolved-doc-references

Conversation

@szakarias

Copy link
Copy Markdown
Contributor

Fixes doc comment references that the analyzer can't resolve, found by temporarily enabling the comment_references lint.

Most are renames — the reference named a member that had been renamed, made private, or removed. Four are judgement calls rather than renames, so flagging them - happy to change any:

  • widgets/_window.dart — removed a sentence describing the if (!isWindowingEnabled) { return widget.child; } path deleted in #188866. The {@macro flutter.widgets.windowing.experimental} later in the same comment already documents the windowing-disabled case.

  • widgets/_window.dart — constructor doc repointed from the removed child to initialWindows.

  • widgets/_window_win32.dart — removed "This can be overridden via the [WindowingOwnerWin32.test] constructor.". git log -S "WindowingOwnerWin32.test(" finds no commit that added that constructor.

  • rendering/viewport.dart — [Viewport.slivers] isn't a member; slivers is a constructor parameter forwarded to super(children: slivers). We cannot reference another class's constructor parameter, so this became [Viewport]'s slivers.

Towards #192870

@szakarias
szakarias requested a review from Piinks September 21, 2026 11:26
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Sep 21, 2026
@github-actions github-actions Bot added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. f: scrolling Viewports, list views, slivers, etc. labels Sep 21, 2026

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates and corrects API documentation references across several Flutter framework files, including box_border.dart, viewport.dart, _window.dart, _window_win32.dart, editable_text.dart, and text_selection.dart, to ensure correct linking and clarity. Feedback on the changes in viewport.dart notes that referencing [Viewport] within the rendering library will cause unresolved doc reference warnings because Viewport is defined in the widgets library and is out of scope.

Comment thread packages/flutter/lib/src/rendering/viewport.dart
Comment thread packages/flutter/lib/src/rendering/viewport.dart
Comment thread packages/flutter/lib/src/rendering/viewport.dart
@flutter-dashboard

Copy link
Copy Markdown

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #193087 at sha b97c3b3

@flutter-dashboard flutter-dashboard Bot added the will affect goldens Changes to golden files label Sep 21, 2026

@Piinks Piinks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 22, 2026
@szakarias
szakarias added this pull request to the merge queue Sep 23, 2026
Merged via the queue into flutter:master with commit a5c569e Sep 23, 2026
27 of 28 checks passed
@szakarias
szakarias deleted the fix-unresolved-doc-references branch September 23, 2026 08:24
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Sep 23, 2026
pull Bot pushed a commit to ScorpiusDraconis83/flutter that referenced this pull request Sep 23, 2026
Follow-up to flutter#192734 and flutter#193087. These are leftovers: four in
`packages/flutter/test`, which the earlier PRs didn't cover, and a few
one-offs.

One fix removes a directive rather than changing a comment:
`image_stream.dart` doc imported `dart:ui`, which made `[Image]` point
at `dart:ui`'s `Image` rather than the widgets library's `Image`.
Nothing needed that doc import: the file's `dart:ui` references are all
prefixed, e.g.`[ui.Image]` and resolve through its real import.

Towards flutter#192870 — enabling the
`comment_references` lint.
pull Bot pushed a commit to fucheng-guo-sun/flutter that referenced this pull request Sep 28, 2026
…ter#193283)

Follow-up to flutter#192734, flutter#193087 and flutter#193216, covering the references
inside `lib/src/material` and `lib/src/cupertino`. Doc comment changes
only.

The changes fall into four kinds:
- missing `@docImport` directives
- qualified member references, e.g. `[value]` →
`[MaterialStatesController.value]`
- a constructor parameter in backticks instead of brackets
(`liveRegion`)
- references to names that do not exist, reworded (`child`, `enabled` in
`cupertino/menu_anchor.dart`)

Towards flutter#192870 — enabling the
`comment_references` lint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: text input Entering text in a text field or keyboard related problems CICD Run CI/CD f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. will affect goldens Changes to golden files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants