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.
This commit is contained in:
PurplePolyhedron 2024-08-14 09:13:34 +08:00 committed by GitHub
parent fb35123b38
commit 593729165d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -55,20 +55,20 @@ export 'package:flutter/rendering.dart' show RenderBox, RenderObject, debugDumpL
// Future<Directory> getApplicationDocumentsDirectory() async => Directory(''); // Future<Directory> getApplicationDocumentsDirectory() async => Directory('');
// late AnimationController animation; // late AnimationController animation;
// An annotation used by test_analysis package to verify patterns are followed
// that allow for tree-shaking of both fields and their initializers. This
// annotation has no impact on code by itself, but indicates the following pattern
// should be followed for a given field:
//
// ```dart
// class Foo {
// final bar = kDebugMode ? Object() : null;
// }
// ```
class _DebugOnly { class _DebugOnly {
const _DebugOnly(); const _DebugOnly();
} }
/// An annotation used by test_analysis package to verify patterns are followed
/// that allow for tree-shaking of both fields and their initializers. This
/// annotation has no impact on code by itself, but indicates the following pattern
/// should be followed for a given field:
///
/// ```dart
/// class Bar {
/// final Object? bar = kDebugMode ? Object() : null;
/// }
/// ```
const _DebugOnly _debugOnly = _DebugOnly(); const _DebugOnly _debugOnly = _DebugOnly();
// KEYS // KEYS