Skip to content

Commit a5c569e

Browse files
authored
Fix unresolved doc comment references (flutter#193087)
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 [flutter#188866](flutter#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 flutter#192870
1 parent 90f93fc commit a5c569e

6 files changed

Lines changed: 23 additions & 24 deletions

File tree

‎packages/flutter/lib/src/painting/box_border.dart‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,9 @@ abstract class BoxBorder extends ShapeBorder {
9090

9191
/// Creates a [Border] with symmetrical vertical and horizontal sides.
9292
///
93-
/// The `vertical` argument applies to the [left] and [right] sides, and the
94-
/// `horizontal` argument applies to the [top] and [bottom] sides.
93+
/// The `vertical` argument applies to the [Border.left] and [Border.right]
94+
/// sides, and the `horizontal` argument applies to the [Border.top] and
95+
/// [Border.bottom] sides.
9596
///
9697
/// All arguments default to [BorderSide.none].
9798
const factory BoxBorder.symmetric({BorderSide vertical, BorderSide horizontal}) =

‎packages/flutter/lib/src/rendering/viewport.dart‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,17 +160,17 @@ enum CacheExtentStyle {
160160
enum SliverPaintOrder {
161161
/// The first sliver paints on top, and the last sliver on bottom.
162162
///
163-
/// The slivers are painted in the reverse order of [Viewport.slivers]
163+
/// The slivers are painted in the reverse order of [Viewport]'s `slivers`
164164
/// (for example, the reverse order of [ScrollView.buildSlivers]
165165
/// or [CustomScrollView.slivers]),
166-
/// and hit-tested in the same order as [Viewport.slivers].
166+
/// and hit-tested in the same order as [Viewport]'s `slivers`.
167167
///
168168
/// This is the default order.
169169
firstIsTop,
170170

171171
/// The last sliver paints on top, and the first sliver on bottom.
172172
///
173-
/// The slivers are painted in the same order as [Viewport.slivers]
173+
/// The slivers are painted in the same order as [Viewport]'s `slivers`
174174
/// (for example, the same order as [ScrollView.buildSlivers]
175175
/// or [CustomScrollView.slivers]),
176176
/// and hit-tested in the reverse order.

‎packages/flutter/lib/src/widgets/_window.dart‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2542,9 +2542,6 @@ class WindowEntry {
25422542
/// listens on the [WindowRegistry] and renders the new windows using the
25432543
/// appropriate window widget as they are added or removed.
25442544
///
2545-
/// If windowing is not enabled, this widgets renders [child] directly
2546-
/// and does not provide the [WindowRegistry].
2547-
///
25482545
/// {@tool dartpad}
25492546
/// An example usage might look like this, where the window manager wraps
25502547
/// the root of the widget tree so that dialogs can be rendered at the same level
@@ -2562,7 +2559,8 @@ class WindowEntry {
25622559
class WindowManager extends StatefulWidget {
25632560
/// Creates a window manager.
25642561
///
2565-
/// The [child] is the content inside of the window manager.
2562+
/// The [initialWindows] are registered with the [WindowRegistry] when the
2563+
/// window manager is created.
25662564
///
25672565
/// {@macro flutter.widgets.windowing.experimental}
25682566
@internal

‎packages/flutter/lib/src/widgets/_window_win32.dart‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ See: https://github.com/flutter/flutter/issues/30701.
6161
/// Abstract handler class for Windows messages.
6262
///
6363
/// Implementations of this class should register with
64-
/// [WindowingOwnerWin32.addMessageHandler] to begin receiving messages.
64+
/// [WindowingOwnerWin32._addMessageHandler] to begin receiving messages.
6565
/// When finished handling messages, implementations should deregister
66-
/// themselves with [WindowingOwnerWin32.removeMessageHandler].
66+
/// themselves with [WindowingOwnerWin32._removeMessageHandler].
6767
abstract class _WindowsMessageHandler {
6868
/// Handles a window message.
6969
///
@@ -130,9 +130,7 @@ class WindowingOwnerWin32 extends WindowingOwner {
130130

131131
final List<_WindowsMessageHandler> _messageHandlers = <_WindowsMessageHandler>[];
132132

133-
/// The [Allocator] used for allocating native memory in this owner.
134-
///
135-
/// This can be overridden via the [WindowingOwnerWin32.test] constructor.
133+
/// The [ffi.Allocator] used for allocating native memory in this owner.
136134
///
137135
/// {@macro flutter.widgets.windowing.experimental}
138136
@internal
@@ -1837,12 +1835,12 @@ extension _Utf16Pointer on ffi.Pointer<_Utf16> {
18371835
}
18381836
}
18391837

1840-
/// Extension method for converting a [String] to a `Pointer<Utf16>`.
1838+
/// Extension method for converting a [String] to a `Pointer<_Utf16>`.
18411839
extension _StringUtf16Pointer on String {
1842-
/// Creates a zero-terminated [Utf16] code-unit array from this String.
1840+
/// Creates a zero-terminated [_Utf16] code-unit array from this String.
18431841
///
18441842
/// If this [String] contains NUL characters, converting it back to a string
1845-
/// using [Utf16Pointer.toDartString] will truncate the result if a length is
1843+
/// using [_Utf16Pointer.toDartString] will truncate the result if a length is
18461844
/// not passed.
18471845
///
18481846
/// Returns an [allocator]-allocated pointer to the result.

‎packages/flutter/lib/src/widgets/editable_text.dart‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4059,12 +4059,13 @@ class EditableTextState extends State<EditableText>
40594059
bool get _hasFocus => widget.focusNode.hasFocus;
40604060
bool get _isMultiline => widget.maxLines != 1;
40614061

4062-
/// Flag to track whether this [EditableText] was in focus when [onTapOutside]
4063-
/// was called.
4062+
/// Flag to track whether this [EditableText] was in focus when
4063+
/// [EditableText.onTapOutside] was called.
40644064
///
4065-
/// This is used to determine whether [onTapUpOutside] should be called.
4066-
/// The reason [_hasFocus] can't be used directly is because [onTapOutside]
4067-
/// might unfocus this [EditableText] and block the [onTapUpOutside] call.
4065+
/// This is used to determine whether [EditableText.onTapUpOutside] should be
4066+
/// called. The reason [_hasFocus] can't be used directly is because
4067+
/// [EditableText.onTapOutside] might unfocus this [EditableText] and block
4068+
/// the [EditableText.onTapUpOutside] call.
40684069
bool _hadFocusOnTapDown = false;
40694070

40704071
// Finds the closest scroll offset to the current scroll offset that fully

‎packages/flutter/lib/src/widgets/text_selection.dart‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2395,8 +2395,9 @@ class TextSelectionGestureDetectorBuilder {
23952395
@protected
23962396
RenderEditable get renderEditable => editableText.renderEditable;
23972397

2398-
/// Returns `true` if a widget with the global key [delegate.editableTextKey]
2399-
/// is in the tree and the widget is mounted.
2398+
/// Returns `true` if a widget with the global key
2399+
/// [TextSelectionGestureDetectorBuilderDelegate.editableTextKey] is in the
2400+
/// tree and the widget is mounted.
24002401
///
24012402
/// Otherwise returns `false`.
24022403
bool get _isEditableTextMounted => delegate.editableTextKey.currentContext?.mounted ?? false;

0 commit comments

Comments
 (0)