Skip to content

Commit a6728d7

Browse files
authored
Add missing @DocImport directives for doc comment references (flutter#192734)
Add doc imports for elements that are not in the lexical scope of the file they appear in. These currently resolve in dartdoc because it maintains a global lookup of everything it has loaded, but the analyzer's `comment_references` lint reports them. Towards flutter#192870 — enabling the `comment_references` lint.
1 parent 2cb5ae4 commit a6728d7

14 files changed

Lines changed: 32 additions & 1 deletion

File tree

‎packages/flutter/lib/src/foundation/print.dart‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
// ignore_for_file: avoid_print
88

99
/// @docImport 'package:flutter/widgets.dart';
10+
///
11+
/// @docImport 'error_dumper.dart';
1012
library;
1113

1214
import 'dart:async';

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
///
88
/// @docImport 'package:flutter_test/flutter_test.dart';
99
///
10+
/// @docImport 'border_radius.dart';
1011
/// @docImport 'borders.dart';
1112
/// @docImport 'box_decoration.dart';
1213
/// @docImport 'box_shadow.dart';

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/// @docImport 'box.dart';
1010
/// @docImport 'paragraph.dart';
1111
/// @docImport 'proxy_box.dart';
12+
/// @docImport 'sliver.dart';
1213
/// @docImport 'view.dart';
1314
/// @docImport 'viewport.dart';
1415
library;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
/// @docImport 'package:flutter/widgets.dart';
6+
library;
7+
58
import 'dart:math' as math;
69

710
import 'package:flutter/foundation.dart';

‎packages/flutter/lib/src/services/flutter_version.dart‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// @docImport 'dart:io'
5+
/// @docImport 'dart:io';
6+
library;
67

78
/// Details about the Flutter version this app was compiled with,
89
/// corresponding to the output of `flutter --version`.

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
/// @docImport 'dart:convert';
6+
library;
7+
58
import 'dart:convert' show utf8;
69
import 'dart:ffi' hide Size;
710
import 'dart:io';

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
/// @docImport 'package:flutter/services.dart';
77
///
88
/// @docImport 'app.dart';
9+
/// @docImport 'view.dart';
910
library;
1011

1112
import 'package:flutter/foundation.dart';

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
/// @docImport 'app.dart';
6+
library;
7+
58
import 'basic.dart';
69
import 'framework.dart';
710
import 'layout_builder.dart';

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
/// @docImport 'raw_radio.dart';
6+
library;
7+
58
import 'dart:ui' show SemanticsRole;
69

710
import 'package:collection/collection.dart';

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
/// @docImport 'tween_animation_builder.dart';
6+
library;
7+
58
import 'package:flutter/animation.dart';
69

710
import 'framework.dart';

0 commit comments

Comments
 (0)