Skip to content

Commit 5937291

Browse files
Move @_debugOnly documentation in framework.dart to be more visible to IDE. (#153134)
Change the location of the documentation of `@_debugOnly` following the style of `@override` so it is visible to IDE where the annotation is used.
1 parent fb35123 commit 5937291

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

packages/flutter/lib/src/widgets/framework.dart

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,20 @@ export 'package:flutter/rendering.dart' show RenderBox, RenderObject, debugDumpL
5555
// Future<Directory> getApplicationDocumentsDirectory() async => Directory('');
5656
// late AnimationController animation;
5757

58-
// An annotation used by test_analysis package to verify patterns are followed
59-
// that allow for tree-shaking of both fields and their initializers. This
60-
// annotation has no impact on code by itself, but indicates the following pattern
61-
// should be followed for a given field:
62-
//
63-
// ```dart
64-
// class Foo {
65-
// final bar = kDebugMode ? Object() : null;
66-
// }
67-
// ```
6858
class _DebugOnly {
6959
const _DebugOnly();
7060
}
7161

62+
/// An annotation used by test_analysis package to verify patterns are followed
63+
/// that allow for tree-shaking of both fields and their initializers. This
64+
/// annotation has no impact on code by itself, but indicates the following pattern
65+
/// should be followed for a given field:
66+
///
67+
/// ```dart
68+
/// class Bar {
69+
/// final Object? bar = kDebugMode ? Object() : null;
70+
/// }
71+
/// ```
7272
const _DebugOnly _debugOnly = _DebugOnly();
7373

7474
// KEYS

0 commit comments

Comments
 (0)