Repository navigation
Fix unresolved doc comment references - #193087
Conversation
There was a problem hiding this comment.
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.
|
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 Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
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.
…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.
Fixes doc comment references that the analyzer can't resolve, found by temporarily enabling the
comment_referenceslint.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 theif (!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 removedchildtoinitialWindows.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;sliversis a constructor parameter forwarded tosuper(children: slivers). We cannot reference another class's constructor parameter, so this became[Viewport]'sslivers.Towards #192870