From ed40e727e4bc9644c8a6ac4d4310289d81bb5097 Mon Sep 17 00:00:00 2001 From: Tong Mu Date: Wed, 24 Jun 2026 15:49:26 -0700 Subject: [PATCH 1/3] Impl --- .../cupertino_ui/lib/src/menu_anchor.dart | 18 +++++++++++------ packages/material_ui/lib/src/carousel.dart | 20 ++++++++++++++----- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/packages/cupertino_ui/lib/src/menu_anchor.dart b/packages/cupertino_ui/lib/src/menu_anchor.dart index 1a99b5c4c397..23363c37767f 100644 --- a/packages/cupertino_ui/lib/src/menu_anchor.dart +++ b/packages/cupertino_ui/lib/src/menu_anchor.dart @@ -295,19 +295,25 @@ typedef CupertinoMenuAnimationStatusChangedCallback = void Function(AnimationSta /// invoked every time the [AnimationStatus] of the menu animation changes. /// /// ## Usage -/// {@tool sample} +// TODO(dkwingsmt): Replace the following block with a blue example container +// when it's supported. https://github.com/dart-lang/dartdoc/issues/4243 +/// /// This example demonstrates a simple [CupertinoMenuAnchor] that wraps /// a button. /// -/// ** See code in examples/api/lib/cupertino/menu_anchor/menu_anchor.0.dart ** -/// {@end-tool} +/// {@example /example/lib/menu_anchor/menu_anchor.0.dart} +/// +// TODO(dkwingsmt): End of the blue example container. +/// +// TODO(dkwingsmt): Replace the following block with a blue example container +// when it's supported. https://github.com/dart-lang/dartdoc/issues/4243 /// -/// {@tool dartpad} /// This example demonstrates a [CupertinoMenuAnchor] that wraps a button and /// shows a menu with three [CupertinoMenuItem]s and one [CupertinoMenuDivider]. /// -/// ** See code in examples/api/lib/cupertino/menu_anchor/menu_anchor.1.dart ** -/// {@end-tool} +/// {@example /example/lib/menu_anchor/menu_anchor.1.dart} +/// +// TODO(dkwingsmt): End of the blue example container. /// /// See also: /// diff --git a/packages/material_ui/lib/src/carousel.dart b/packages/material_ui/lib/src/carousel.dart index f3d3127bf81d..84428097aacd 100644 --- a/packages/material_ui/lib/src/carousel.dart +++ b/packages/material_ui/lib/src/carousel.dart @@ -51,7 +51,10 @@ import 'theme.dart'; /// [CarouselView.weighted] is used, then set the [flexWeights] to only have /// one integer in the array. /// -/// {@tool snippet} +// TODO(dkwingsmt): Replace the following block with a blue example container +// when it's supported. https://github.com/dart-lang/dartdoc/issues/4243 +// TODO(dkwingsmt): Add unit tests to this code snippet. +// https://github.com/flutter/flutter/issues/188530 /// /// This code snippet shows how to get a vertical full-screen carousel by using /// [itemExtent] in [CarouselView]. @@ -82,7 +85,8 @@ import 'theme.dart'; /// ), /// ), /// ``` -/// {@end-tool} +/// +// TODO(dkwingsmt): End of the blue example container. /// /// In [CarouselView.weighted], weights are relative proportions. For example, /// if the layout weights is `[3, 2, 1]`, it means the first visible item occupies @@ -108,7 +112,9 @@ import 'theme.dart'; /// visible items may be slightly compressed during scrolling. The [shrinkExtent] /// property controls the minimum allowable size for these compressed items. /// -/// {@tool dartpad} +// TODO(dkwingsmt): Replace the following block with a blue example container +// when it's supported. https://github.com/dart-lang/dartdoc/issues/4243 +/// /// Here is an example to show different carousel layouts that [CarouselView] /// and [CarouselView.weighted] can build. /// @@ -120,9 +126,13 @@ import 'theme.dart'; /// /// This key-driven behavior is dictated by the [ScrollBehavior.pointerAxisModifiers], /// while [ScrollBehavior.dragDevices] manages what devices can drag a scrollable. +// +// TODO(dkwingsmt): Replace the example with a dartpad block when it's +// supported. https://github.com/dart-lang/dartdoc/issues/4123 +/// +/// {@example /example/lib/carousel/carousel.0.dart} /// -/// ** See code in examples/api/lib/material/carousel/carousel.0.dart ** -/// {@end-tool} +// TODO(dkwingsmt): End of the blue example container. /// /// See also: /// From a3ff59eef909522497d31fc7e1ed55582a369c94 Mon Sep 17 00:00:00 2001 From: Tong Mu Date: Wed, 24 Jun 2026 16:44:36 -0700 Subject: [PATCH 2/3] Add analyzer ignore --- analysis_options.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/analysis_options.yaml b/analysis_options.yaml index 212c3e2fd157..ddbf5764b899 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -16,6 +16,9 @@ analyzer: # something (https://github.com/flutter/flutter/issues/143312) deprecated_member_use: ignore deprecated_member_use_from_same_package: ignore + # `dart analyze` hasn't recognized this new directive yet. + # Remove it once https://github.com/dart-lang/sdk/pull/63646 is landed. + doc_directive_unknown: ignore exclude: # DIFFERENT FROM FLUTTER/FLUTTER # Ignore generated files - '**/*.pb.dart' From ef185bc52349ccb179953c80badbdef0d764e538 Mon Sep 17 00:00:00 2001 From: Tong Mu Date: Wed, 24 Jun 2026 16:45:08 -0700 Subject: [PATCH 3/3] Remove space --- packages/cupertino_ui/lib/src/menu_anchor.dart | 4 ++-- packages/material_ui/lib/src/carousel.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/cupertino_ui/lib/src/menu_anchor.dart b/packages/cupertino_ui/lib/src/menu_anchor.dart index 23363c37767f..e654b9662e70 100644 --- a/packages/cupertino_ui/lib/src/menu_anchor.dart +++ b/packages/cupertino_ui/lib/src/menu_anchor.dart @@ -296,7 +296,7 @@ typedef CupertinoMenuAnimationStatusChangedCallback = void Function(AnimationSta /// /// ## Usage // TODO(dkwingsmt): Replace the following block with a blue example container -// when it's supported. https://github.com/dart-lang/dartdoc/issues/4243 +// when it's supported. https://github.com/dart-lang/dartdoc/issues/4243 /// /// This example demonstrates a simple [CupertinoMenuAnchor] that wraps /// a button. @@ -306,7 +306,7 @@ typedef CupertinoMenuAnimationStatusChangedCallback = void Function(AnimationSta // TODO(dkwingsmt): End of the blue example container. /// // TODO(dkwingsmt): Replace the following block with a blue example container -// when it's supported. https://github.com/dart-lang/dartdoc/issues/4243 +// when it's supported. https://github.com/dart-lang/dartdoc/issues/4243 /// /// This example demonstrates a [CupertinoMenuAnchor] that wraps a button and /// shows a menu with three [CupertinoMenuItem]s and one [CupertinoMenuDivider]. diff --git a/packages/material_ui/lib/src/carousel.dart b/packages/material_ui/lib/src/carousel.dart index 84428097aacd..964dfaacf578 100644 --- a/packages/material_ui/lib/src/carousel.dart +++ b/packages/material_ui/lib/src/carousel.dart @@ -52,7 +52,7 @@ import 'theme.dart'; /// one integer in the array. /// // TODO(dkwingsmt): Replace the following block with a blue example container -// when it's supported. https://github.com/dart-lang/dartdoc/issues/4243 +// when it's supported. https://github.com/dart-lang/dartdoc/issues/4243 // TODO(dkwingsmt): Add unit tests to this code snippet. // https://github.com/flutter/flutter/issues/188530 /// @@ -113,7 +113,7 @@ import 'theme.dart'; /// property controls the minimum allowable size for these compressed items. /// // TODO(dkwingsmt): Replace the following block with a blue example container -// when it's supported. https://github.com/dart-lang/dartdoc/issues/4243 +// when it's supported. https://github.com/dart-lang/dartdoc/issues/4243 /// /// Here is an example to show different carousel layouts that [CarouselView] /// and [CarouselView.weighted] can build.