From 593729165d14f282e51bec381939c4b017bc43f4 Mon Sep 17 00:00:00 2001 From: PurplePolyhedron <120297255+PurplePolyhedron@users.noreply.github.com> Date: Wed, 14 Aug 2024 09:13:34 +0800 Subject: [PATCH] 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. --- .../flutter/lib/src/widgets/framework.dart | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart index 9f6ef2e909..2feb53a2e7 100644 --- a/packages/flutter/lib/src/widgets/framework.dart +++ b/packages/flutter/lib/src/widgets/framework.dart @@ -55,20 +55,20 @@ export 'package:flutter/rendering.dart' show RenderBox, RenderObject, debugDumpL // Future getApplicationDocumentsDirectory() async => Directory(''); // 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 { 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(); // KEYS